in reply to Re: State this simple regex in English?
in thread State this simple regex in English?

thanks guys,

STILL seems a bit ambiguous since, afterall, there ARE 0-many 2-9's at the end (there are 0 of them!)... But I suppose it only makes sense to act like this because otherwise it would behave just like /CAT.*/

YAPE::Regfex::Explain looks cool never tried it or knew about it, thanks for that tip...

  • Comment on Re^2: State this simple regex in English?

Replies are listed 'Best First'.
Re^3: State this simple regex in English?
by soonix (Chancellor) on Apr 20, 2016 at 18:52 UTC
    if your regex were "simply" CAT[2-9]* then CAT1 would match, but the $ (which means end of string) in CAT[2-9]*$ prevents a match.
    Would you expect C1AT to match?
Re^3: State this simple regex in English?
by AnomalousMonk (Archbishop) on Apr 20, 2016 at 20:50 UTC
    YAPE::Regfex::Explain looks cool ...

    It does, but of course be aware that, per the docs, "There is no support for regular expression syntax added after Perl version 5.6, particularly any constructs added in 5.10."


    Give a man a fish:  <%-{-{-{-<

        are you that Anonymonks?! in the case (or anyway) many many thanks!

        L*

        There are no rules, there are no thumbs..
        Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Re^3: State this simple regex in English?
by stevieb (Canon) on Apr 20, 2016 at 17:45 UTC

    You may also be interested in use re 'debug';