in reply to /x on regexes in Perl6?

Gee, I wish I had seen you there...

Well, I suppose I'm a good person to have answer this. By making /x the default, people will be inclined to space out (and comment!) their regexes. This is definitely a help.

_____________________________________________________
Jeff japhy Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Re: /x on regexes in Perl6?
by chromatic (Archbishop) on Aug 06, 2001 at 07:08 UTC
    So matching a literal space will require something like /\ /? (Supposing I don't want to match a tab or a newline character, and don't want to match a character class.)

    That's rare enough, I can't see where it would be a burden on me. Might be tough to read, though, which makes the character class a better solution. Or a quick comment, which is probably the best solution.

    if ($string =~ /\ # literal space here /) { # do this or that }