Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Regex word options

by abualiga (Scribe)
on Nov 01, 2012 at 02:51 UTC ( #1001769=note: print w/ replies, xml ) Need Help??


in reply to Regex word options

agree with ww. The '||' operator may be better suited here than the word boundary '\b'. Also, what are you trying with the '?' non-greedy quantifier? Are you looking for lines starting with these words? Perhaps I'm missing something, but you would probably benefit more from providing some input data.

Replies are listed 'Best First'.
Re^2: Regex word options
by falpizar91 (Initiate) on Nov 01, 2012 at 04:16 UTC

    why not try:

    if( $inputStr =~ /^(Arranged\,|Transcribe\,)/ ){ ### do your stuff }

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2016-06-29 04:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (368 votes). Check out past polls.