[\d\.]+ matches a digit or a period one or more times
 * (that's space asterisk) matches 0 or more spaces
\$? matches a dollar sign 0 or 1 time
 * (that's space asterisk) matches 0 or more spaces
(?:[\\/]|per) I'm not 100% sure on..  It looks like it matches either
:V or per ...
 * (that's space asterisk) matches 0 or more spaces
d.?o.?s.?e matches d followed by 0 or 1 period, o followed by 0 or 1
period, s followed by 0 or 1 period, and e

Close, but not quite.

(?:[\\/]|per)

The (?:) is bracketing.  A normal pair of parends would be 'capturing' and
keep track of what was found within the grouping.  The ?: modifier tells
Perl to not bother capturing the contents, since it won't be used later.
This is an efficiency concern.

The [\\/] is a character set match.  It is looking for either / or \.  The
other side of the alternation is 'per'.  Thus it is looking for 'per', or a
slash or backslash as in $1.25/dose.

d.?o.?s.?e matches d followed by 0 or 1 *any character*, followed by o, etc.
A bare dot in a regex is a 'match any character except newline' character.
So this is looking for 'dose', 'd ose', 'd*o*s*e', or any other random form
of one-character obfuscation.

        Loren

Reply via email to