So thats what the regex does. But it doesn't look quite right for its stated purpose -- for example, your numbers could have two decimal points. --Dave$interest !~ / # match against $interest (negated) ^ # start of line -? # optional minus sign \.? # optional decimal point \d+ # 1 or more digits (?: # start non-capturing group (i.e. not $1) \. # decimal point \d+ # 1 or more digits )? # end of group -- match 0 or 1 times $ # end of line /x; # end of regex (the /x modifier allows # comments in the regex -- can be useful)
In reply to Re: What does this regex do?
by dpuu
in thread What does this regex do?
by sulfericacid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |