View Full Version : Regular Expressions
bchawla
Sat 25th Feb '06, 3:22pm
what does the "#" mean in a regular expression? :)
TCM
Sat 25th Feb '06, 6:32pm
It generally is used to comment out a line of text, I belive. :)
merk
Sat 25th Feb '06, 8:18pm
Not for Regex.
# at the start of a regex string is used as an inidicator that the regex pattern starts (and another one at the end to indicate the end of the regex pattern).
You could also see /PATTERN/, and there are a few others as well.
Chroder
Sat 25th Feb '06, 11:26pm
If you specify the x pattern modifier, it does specify a comment line.
vB does use the # character as the regex delimiter as merk stated, but you can choose just about any character as the delimiter.
bchawla
Mon 13th Mar '06, 6:48pm
What if i wanted to use # as part of Apache's rewrite module/
iv'e tried \# and no luck -- it doesnt work :(
Powered by vBulletin™ Version 4.0.2 Copyright © 2010 vBulletin Solutions, Inc. All rights reserved.