I like to think of brackets as groupings of matches. it'll throw an error if you remove them here because your replace is relying on the backreference \1 to that grouping its discovered in the find.
> -----Original Message----- > From: Aidan Whitehall [mailto:[EMAIL PROTECTED] > Sent: 20 June 2003 11:58 > To: [EMAIL PROTECTED] > Subject: RE: [ cf-dev ] RegEx replace in ColdFusion Studio 5 > > > > <cfoutput query=([^"]) > > > > replace with > > > > <cfoutput query="\1 > > That's cule, thanks again. > > One thing I haven't got a handle on (despite Paul's great RegEx > tutorial) is when you do and don't need brackets. I thought you only > needed them if you were specifying a particular sequence of characters > (i.e. a string) to match. > > Yet, if you remove them in this instance, because you're just looking > for a single quotation mark and not a string, Studio throws a "Regular > expression error". Could anyone please explain that? > > > -- > Aidan Whitehall <mailto:[EMAIL PROTECTED]> > Macromedia ColdFusion Developer > Fairbanks Environmental Ltd +44 (0)1695 51775 > Queen's Awards Winner 2003 <http://www.fairbanks.co.uk/go/awards> > > ______________________________________________________________ > __________ > This e-mail has been scanned for all viruses by Star Internet. The > service is powered by MessageLabs. For more information on a proactive > anti-virus service working around the clock, around the globe, visit: > http://www.star.net.uk > ______________________________________________________________ > __________ > > -- > ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ > > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > For human help, e-mail: [EMAIL PROTECTED] > -- ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/ To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] For human help, e-mail: [EMAIL PROTECTED]
