Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Regex OR'ing

by tye (Sage)
on Jul 28, 2000 at 07:16 UTC ( #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
Node Status?
node history
Node Type: note [id://24796]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2020-01-22 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?