Err.. the pre points to <pre> it should be [pre].. fixed one below..

(\[b\]([Aa-zZ0-9\s]*)\[/b\])(?!((?!\[pre\]).)*?\[/pre\])

Umer Farooq wrote:
> The following regex should do the trick..
> 
> <cfset changed = rereplace(temp, 
> "(\[b\]([Aa-zZ0-9\s]*)\[\/b\])(?!((?!<pre>).)*?<\/pre>)", "<b>\2</b>", 
> "ALL")>
> 
> note the backrefrence "\2" is to ([Aa-zZ0-9\s]*).. do not use the "dot" 
> notation in there.
> 
> --
> Regards
> 
> Ewok wrote:
> 
>>This is a tough one...
>>
>>It's an old bbml parser I wrote a while back and im trying to modify it a
>>little.
>>
>>I want to search through the string and replace all instances of [b] with
>><b> UNLESS it falls between [pre] and [/pre]
>>
>>I just can't seem to get it right.
>>
>>Replace [b] with <b> except when it starts with [code]* and ends with
>>*[/code]
>>
>>Even that sentence was hard to write at 4 in the morning ZZzzzz
>>
>>
>>
>>
> 
> 

-- 
Umer Farooq
Octadyne Systems
+1 (519) 489-1119 voice ***NEW AS OF 01/05***
+1 (519) 635-2795 mobile
+1 (208) 275-3824 fax


LOOKING FOR A USED CAR IN IOWA VISIT: http://www.IowaMotors.com


WARNING: ------------------------------- The information contained in 
this document and attachments is confidential and intended only for the 
person(s) named above. If you are not the  intended recipient you are 
hereby notified that any disclosure, copying, distribution, or any other 
use of the information is strictly prohibited.  If you have received 
this document by mistake, please notify the sender immediately and 
destroy this document and attachments without making any copy of any kind.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
 Save $10 Download ZoneAlarm Security Suite 
http://www.houseoffusion.com/banners/view.cfm?bannerid=66

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190608
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to