Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: One Liner Regex Question

by fruiture (Curate)
on May 11, 2003 at 12:11 UTC ( #257225=note: print w/ replies, xml ) Need Help??


in reply to One Liner Regex Question

m/._(FOO|BAR)$/ ? 'true' : 'false'

See perlre, this shouldn't be too hard

--
http://fruiture.de


Comment on Re: One Liner Regex Question
Download Code
Re: Re: One Liner Regex Question
by Anonymous Monk on May 11, 2003 at 12:39 UTC

    hmm, I must be doing something wrong. Doesn't work for me. I'm at a disadvantage as I'm not using perl.

    Here's where I'm testing solutions: Jakarta ORO

      That is neither offered solution works. Thanks anyways!

        Aha! I just tried that site...the solutions work, but you either need click "contains" rather than "matches", or add something to the start of the regex to match the beginning of the string too... ".+?" or similar.
        Cheers,
        Ben.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://257225]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (8)
As of 2014-09-23 11:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (219 votes), past polls