in reply to Why is it "While Regex"ing,...Things do NOT seem to work!

I'll just add, since nobody seems to have mentioned (or I missed it in all the code):

When you run a regex, and it assigns things to $1, $2 etc, its best to copy those into other variables right away, before you do any more regexes. There is no guarantee that they will contain the same content after running another regex, in fact its generally guaranteed that they won't.

C.

  • Comment on Re: Why is it "While Regex"ing,...Things do NOT seem to work!