Thread: Regex examples
View Single Post
Old 06-02-2013, 06:48 PM   #226
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,583
Karma: 79436940
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Quote:
Originally Posted by mzmm View Post

the '.' and '?' are reserved characters, so to get them to match a literal . or ? you have to escape them with a slash (hence \. and \?).
You actually don't have to quote . and ? within a character class; the only special characters there are ] ^ and \ .
PeterT is offline   Reply With Quote