in reply to TokeParser
You can exclude numbers with decimal points using something like this, which will work no matter what else is going on around the numbers in a particular text string:
This way, if there is any character before and/or after a one- or two-digit number, the character must not be a period. (update: added "\d" inside each of the bounding character class specs, to make sure we don't match 3 or more digits.)print "$text\n" if ( $text =~ /[^.\d]?\d{1,2}[^.\d]?/ );
|
|---|