in reply to Regex and a pseudo-XML tag

Well, your regex explicitely forbids spaces:
[^'" >]+
so I wonder why you are surprised it only 'works' if there are no spaces in the value. If you want spaces, don't forbid them.

Having said that, there are many more problems with your regexp. Why don't you use one of the many XML parsing modules from CPAN?

Abigail

Replies are listed 'Best First'.
Re: Re: Regex and a pseudo-XML tag
by inblosam (Monk) on Nov 20, 2003 at 16:27 UTC
    That works great! I didn't know that the "space greater than" excluded whitespace, so I learned something new! THANKS!
      "space greater than" does not exclude whitespace.

      If you use character classes (which is the thing inside [ ... ]) you exlude the characters mentioned in the character class if the first character after the [ is a ^. It sort of negates the list within the square brackets or includes all characters not in the list.

      CountZero

      "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

        I unlearned something and learned something new and correct! Thanks for the specifics. :)