in reply to Matching a pattern which resides within round brackets
Good answers above; suggestion below as a variant way of saying "Welcome to the Monastery."
Please read:
Re your code: Note that the [ ... ] does NOT "escape" the character(s) it encloses in the usual sense (though it will cause the paren to be treated as a literal, in a regex). But so too will the customary escape character, the backslash (\).
If you plan to do much with Perl regexen, Mastering Regular Expressions (ca $US45.) and/or O'Reilly's "Regular Expressions Pocket Reference" ( <$US10.) are well worth the investment.
|
|---|