At least I'm not alone :)

I had thought about something to that effect but...

I wanted content between [code] and [/code] to stay exactly as the user
typed it. So if there are <b> tags they display as <b> and if there are [b]
tags they display as [b]

Jim Davis came up with a loop that extracts code blocks and replaces them
with a marker... then you can just do your replaces on everything then
replace the markers with the original code blocks and voila! 

It worked well but my assumption was that a regular expression that can
replace an open tag and an end tag and at the same time make the decision on
rather or not it's between [code] and [/code] would be much faster.

I'm at the point where I'll probably just combine both and move on with my
life.

Thanks for the thoughts, and watch those non-nullable fields! :)



-----Original Message-----
From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED] 
Sent: Sunday, January 16, 2005 8:24 PM
To: CF-Talk
Subject: Re: regex help (Almost)

Still fighting that thing, eh? I spent 3 hours this afternoon trying
to figure out why a simple INSERT query wouldn't work... finally I
wrapped the query text in ## and a cfoutput, then copy/pasted it into
Query Analyzer... only to find out that the problem was a new column
in the database that was marked not nullable. I hadn't updated the
insert to account for the new column.

DANG, I hate when that happens.

But, my my thought is this...

Why not convert every single HR or BR tag to <hr>, then run rereplace
with a regex that finds  [\[code\].<hr>.\[\/code\]] and converts <hr>
back to [HR]. Granted, it may not be the utmost in elegance (which is
never pleasing), but it would work.

Just a thought... I'll keep thinking on it too. Hard as that whole
"thinking" thing may be.

Laterz,
J

-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 1/16/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.6.13 - Release Date: 1/16/2005
 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:190662
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=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to