Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • by vsergu (505) on 2004.10.18 13:32 (#35295) Journal
    I suspect part of the problem could be that you're not getting the correspondence between person, ID, and so on that you expect because .*? is matching more than you want it to. You could be matching a person from one record and then skipping over parts of that record to another one because some of the other patterns don't match for that record.

    It may not be what's happening in this case, but a common oversight in constructing regexes is to assume that .*? will match the shortest possible sequence of characters to satisfy the overall match. That's not true. It's still matches the first position it can, and takes the shortest sequence that starts there.