Could a blessed monk point out my folly please? Thanks for all the replies to my previous question (esp. dws) and TIA for this one. Jono#!/usr/bin/perl while (<>) { print if m!(^-{0,1}\d*)\s+(\d*)!m; print "$_\n" for ($1 .. $2); } But when I allow both to be negative it doesn't: #!/usr/bin/perl while (<>) { print if m!(^-{0,1}\d*)\s+(^-{0,1}\d*)!m; print "$_\n" for ($1 .. $2); }
In reply to regex negative numbers by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |