Will Tomlinson wrote:

> (if|for)+\s+\(|\)\s+\{

That's probably not quite what you want: it'll match multiple "if"s and
"for"s at the start, and I don't think you want the "|" inside the
parentheses - that means that the regexp will match either what's before
it or what's after it. You would get a match on "ififfor (" or ") {",
for example.

"(if|for)\s+\(.*\)\s+\{" is a minimal alternative that should do what
you want, though it doesn't do any checking of what might lie inside the
parentheses, or before or after the matched part of the string.

-- 
Regards,

Pete Jordan
Horus Web Engineering Ltd
http://www.webhorus.net/
phone: +44 1275 543971
mobile: +44 7973 725120

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308458
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to