develooper Front page | perl.perl6.users | Postings from June 2018

Re: need second pair of eyes

Thread Previous | Thread Next
From:
Brandon Allbery
Date:
June 13, 2018 00:27
Subject:
Re: need second pair of eyes
Message ID:
CAKFCL4UrgYoqktJETDXrQ2Wj2Kn1GOxmoibBp4PmcdPT_Xa96Q@mail.gmail.com
No, you are stuck with

    $foo ~~ m|xxx| && $foo ~~ m|yyy|

or

    $foo ~~ m|xxx .* yyy|

(the latter assuming they always happen in that order; if they don't, you
can only use the first.)

On Tue, Jun 12, 2018 at 8:25 PM ToddAndMargo <ToddAndMargo@zoho.com> wrote:

> On 06/12/2018 05:19 PM, Brandon Allbery wrote:
> > You're trying to do it all in one regex. That doesn't work; what you
> > tried will attempt to test that the same *substring* of the regex
> > matches both of those, which is not possible because they're both
> > literal. So any given substring has to be one, the other, or neither, it
> > can't simultaneously be both.
>
> So I am stuck with using "/"
>
> Thank you for the help.
>
> -T
>


-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About