c has asked for the wisdom of the Perl Monks concerning the following question:
My regex is as follows:
/C(?:800)|(?:(?:35|29)(?:(?:50)|(?:00XL)))/
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:
(?:(?:50)|(?:00XL))
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