RE: regular expression to find #

2008-11-19 Thread Andy Matthews
You'd treat those characters as a character set like so: cfset myString = 'a test ## to see . where I might find % in some string' cfset matches = REFind('[##.\/%]',myString,1,true) cfdump var=#myString# cfdump var=#matches# cfabort Putting the characters inside the square brackets forces the

Re: regular expression to find ##

2008-11-19 Thread Mike Wesling
I thought you cannot just place a . or \ as they are special characters. I also need to find a double . not a single. right now I am using '[##\\%]' and it is returning true on every evaluation. You'd treat those characters as a character set like so: cfset myString = 'a test ## to see .

Re: regular expression to find ####

2008-11-19 Thread Jason Fisher
That is correct. Try this, with \ as escape character: REFind('[##\.\\/%]',myString) I thought you cannot just place a . or \ as they are special characters. I also need to find a double . not a single. right now I am using '[##\\%]' and it is returning true on every evaluation.

Re: regular expression to find ####

2008-11-19 Thread Peter Boughton
I thought you cannot just place a . or \ as they are special characters. The . is not special when used within a character class (the square brackets). i.e. You do *not* need to escape [.] - that will match dot, not 'any character'. I also need to find a double . not a single. A character