go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Did you know that regexp matches:
But fails to match:
You might want to try this. It's somewhat simpler than yours, and it disallows the single hyphen, but allows decimals which start with the decimal point and no preceding 0.
Or if you consider a leading/trailing decimal point to be an error, it can be made simpler:
perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
In reply to Re^3: Floating Point/Integer Regular Expression
by tobyink
|
|