Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Regex OR'ing

by tye (Sage)
on Jul 28, 2000 at 07:16 UTC ( [id://24796]=note: print w/replies, xml ) Need Help??


in reply to Regex OR'ing

Well, I'm still not clear, but this might work:

$var =~ /regex(catch_this)|$/

I don't see why you need to match nothing at the start of the string so matching nothing only at the end of the string might fix your problem. You can use \Z instead of $ is you are paranoid about trailing newlines and don't care about not working on old versions of Perl.

Replies are listed 'Best First'.
RE: Re: Regex OR'ing
by spectre (Scribe) on Jul 28, 2000 at 20:47 UTC
    This is what I ended up doing - It works beautifully.
    Thanks for the suggestion

    Regards,
    spectre

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-26 01:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found