in reply to Re: how can I use regular expresion if my string to be matched has round brackets
in thread how can I use regular expresion if my string to be matched has round brackets
Well, quotemeta and \Q will simple escape any character that isn't a letter, digit or underscore. It doesn't have any knowledge of which characters are special and which aren't, except for the promise that if character that isn't a letter, digit or underscore is escaped, it will never carry a special meaning inside a regexp. I'm not quite sure what you mean by "useful" and "see what escapes to use for next time", but people often frown when commas, spaces and other 'harmless' punctuation characters are escaped in a regexp literal.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: how can I use regular expresion ... (quotemeta and extending regexes)
by moritz (Cardinal) on Oct 06, 2008 at 15:35 UTC |