in reply to Re: Extend regex legibility within character classes
in thread Extend regex legibility within character classes

That's what I started with, but wanted to get rid of the extra named variable. Using the @{[]} trick lets me write it in one statement.

The extra variable would be less objectionable if I could hide the scope, but if the real one I'm declaring is also a "my", I can't put braces around the whole thing. It would take a third line, outside of the braces, first to declare it.

—John

  • Comment on Re: Re: Extend regex legibility within character classes

Replies are listed 'Best First'.
Re: Re: Re: Extend regex legibility within character classes
by tye (Sage) on Jun 12, 2001 at 01:25 UTC
    my $XML_BaseChar= qr/$_/ for join "", "[", # a character class... "\x{0041}-\x{005A}", # the first range "\x{0100}-\x{0131}\x{0134}-\x{013E}\x{0141}-\x{0148}", # the next r +ange "\x{01FA}-\x{0217}\x{0250}-\x{02A8}", # etc. "]"; #here's how to close it up
            - tye (but my friends call me "Tye")