It just occurred to me that the any pattern matches should be non-greedy for matching accuracy: if\s*\(.*?\s+.*?\)\s*\{
On Mon, Jun 30, 2008 at 3:10 PM, Sonny Savage <[EMAIL PROTECTED]> wrote: > This RegEx will tell you if there are any spaces between the parenthesis: > if\s*\(.*\s+.*\)\s*\{ > > Edward A Savage Jr - "Sonny" > Senior Software Engineer > Creditdiscovery, LLC > "An appeaser is one who feeds a crocodile, hoping it will eat him last." ~ > Sir Winston Churchill > > On Mon, Jun 30, 2008 at 2:58 PM, Will Tomlinson <[EMAIL PROTECTED]> > wrote: > >> I can do just one part, but if I try to make it an either/or with a pipe, >> it throws me off. This works. >> >> <cfset str = 'if (someKey in struct){'> >> >> <cfset re = 'if\s+\('> >> >> <cfoutput>#reFindNoCase(re, str)#</cfoutput> >> >> How do I add the brackets and so it'll catch one or the other? >> >> Thanks much, >> Will >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:308330 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4