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.
  • You reset $str2 (in essence) on every loop, but you continually match against the same $str.

    So if you unroll your loops, you get basically this.

    Look for, at the beginning of the string, "J:", followed by a bunch of stuff that isn't a newline. (.+ with /m). Did you succeed? Remember this spot and proceed.

    Look for, at the beginning of the string (where we left off), "I:", followed by a bunch of stuff that isn't a newline. Did you succeed? *Remember this spot and proceed*.

    Look for, at the beginning of the string *where we left off*, "I:", followed by a bunch of stuff that isn't a newline. Did you succeed? No? Oh, well, reset.

    Look for, at the beginning of the string, "J:", followed by a bunch of stuff that isn't a newline. Did you succeed?