Sweet.

Thanks for the new info.

Jerry Johnson

>>> [EMAIL PROTECTED] 08/27/02 03:54PM >>>
That's not 100% true. 
1. If the first character of a set is a close bracket and there's no open bracket in 
the set, then it will match:
[]0-9] will match ]0123456789
2. If the open bracket is anywhere in the set without a close bracket, it'll match:
[0-9[] will match [0123456789
[[0-9] will match [0123456789
3. If you set a range in your set that starts with an open bracket and goes until a 
tilde, then it'll match:
[[-^] will match [/]^
4. If you use a grouping with a pipe, you can fake the brackets:
(\[|/]|[0-9]) will match []0123456789
And you can always use the [[:punct:]]. :)


> From the Advanced Cold Fusion 5 Application Development, by Ben Forta, page 230:
> 
> [ and ] Brackets delimit a character class and are not allowed within the class 
>itself. Cold Fusion RegEx does not allow them as escaped characters.
> 
> Of course, the [:punct:] class handles them as well as all the other brackets, so 
>you COULD use that.
> 
> But I have often replaced them with another (unused) pair of characters to allow 
>regex to work.
> 
> Jerry Johnson
> 
> 
> >>> [EMAIL PROTECTED] 08/27/02 02:19PM >>>
> Hi there,
> I'm having a problem in CF5 - if I try to use a regular expression to match a 
>pattern that contains either the [ or ] characters, the find fails. I've already 
>tried escaping each and using ascii character codes instead of the actual character, 
>but I can't seem to make it work.
> 
> If I change the text to use ( and ) or { and } and escape them properly, the regex 
>find works as expected.
> 
> Is this a known problem? Is there a workaround?
> 
> 
> Thanks,
> 
> Matt
> 
> 
> 

______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to