go ahead... be a heretic | |
PerlMonks |
A question of 'or' in a Regexby c (Hermit) |
on May 28, 2003 at 14:46 UTC ( [id://261317]=perlquestion: print w/replies, xml ) | Need Help?? |
c has asked for the wisdom of the Perl Monks concerning the following question:
My regex is as follows:
Concerning this snippet of code, I have two questions... 1. Is this using too many paren statements, or is this just per coder's discretion? 2. This regex matches on 'C3550XL' and I'm not sure why. I would expect C3500XL or C3550, but not this problematic mix of the two. My thought is that the statement:
seperates the 50 and the XL portion ensuring a match only on strings with XL that are directly preceeded by two zeros. Thanks in advance for you guidance. -c
Back to
Seekers of Perl Wisdom
|
|