PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Fri Jul 03, 2020 2:38 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Jun 06, 2005 11:45 am 
Offline
Forum Contributor

Joined: Fri May 03, 2002 10:33 am
Posts: 108
Location: Cheshire


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 06, 2005 12:22 pm 
Offline
Forum Regular
User avatar

Joined: Sat Mar 12, 2005 8:13 pm
Posts: 703
Location: US


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 06, 2005 12:22 pm 
Offline
Forum Regular
User avatar

Joined: Sat Mar 12, 2005 8:13 pm
Posts: 703
Location: US


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 06, 2005 12:32 pm 
Offline
Forum Contributor

Joined: Fri May 03, 2002 10:33 am
Posts: 108
Location: Cheshire
No, sorry. That had no effect whatsoever. It still only caught the first occurrence.

You removed the recurrence reference (?letterR) (forum replaces an R with are). I tried it both ways, with or without recurrence and I get the exact same result.

hmm. thanks for trying.

some time later....

Ok, for the time being I've had to kludge it by putting an extra cycle in after the usual find/replace routine.

Syntax: [ Download ] [ Hide ]
while($flag == false)

        {

                $oldOutput = $output;

                $output = preg_replace("'\[colou?r-([A-F0-9]{6})\](.*)?\[/colou?r-\\1\]'","<span style=\"color:#\\1\">\\2</span>",$output);

                $flag = $oldOutput == $output?true:false;

        }


That continues to replace the different colours until it can find no more but it's not the way I'd like to do it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group