Hi All.

Is it correct that this regex:

$content =~ /^(
        [...@%&*]
        (?: : (?!:) | # Allow single-colon non-magic vars
                (?: \w+ | \' (?!\d) \w+ | \:: \w+ )
                (?:
                        # Allow both :: and ' in namespace separators
                        (?: \' (?!\d) \w+ | \:: \w+ )
                )*
                (?: :: )? # Technically a compiler-magic hash, but keep         
                          #it here
        )
)/x;

is the same is this?

$content =~ /^(
        [...@%&*]
        (?: : (?!:) | # Allow single-colon non-magic vars
                (?: \w+ | \' (?!\d) \w+ | \:: \w+ )
        )
        # Allow both :: and ' in namespace separators
        (?: \' (?!\d) \w+ | \:: \w+ )*
        (?: :: )? # Technically a compiler-magic hash, but keep it here
)/x;

Thanks,
Shmuel.
_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl

Reply via email to