On 12/27/05, Loren Wilton <[EMAIL PROTECTED]> wrote: > 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.
Ahh, I was not aware of that.. That does come in handy.. Thanks for that info :) > 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. Heh.. font issue.. I could have *sworn* that was \V and not \\/ I had no idea what \V meant and couldnt find a reference to it.. *grin* > 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. Typo on my part.. I meant any character... Sorry bout that.. :) > Loren Thanks for clearing everything else up.. My regex foo is still a little weak.. -- Jason 'XenoPhage' Frisvold [EMAIL PROTECTED]