You didn't watch what you were doing when you copy-and-pasted. Your second regex contains two ^ assertations... in other words, you required the string to begin two sepperate places. (There are circumstances where it is kosher to have two ^s in a regex -- to whit, where there can be nothing between them, or where one is optional. Oh, or if you use the approprate modifer (/m, IIRC, but my memory is bad), ^ will match after a newline as well as at the begnning of the string). Read perlre for more info on regexes.
In reply to Re: regex negative numbers
by theorbtwo
in thread regex negative numbers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |