in reply to Numerical Regular Expression for pattern match
but... point 2:
As written, the "\" in your regex before each open_square_bracket escapes the bracket, meaning you're NOT matching against a character class, but rather against a string consisting of open_sq, +, -, close_sq. before the digits.
and, point 3:
Perl's implementation of RE is (ok, "is arguably") the best around, but perl is not the only language with regexen; javascript and java leap immediately to mind, and various *nix utilities implement them in more limited fashion (and with some variance of syntax)
Online tutorials are numerous, perlretut and friends work well as quick refreshers, and the gold standard is Friedl's book, "Mastering Regular Expressions." (The link goes to O'Reilly's twofer (as of April 06) offer; the Stibblebine "Pocket Reference"
|
|---|