Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Dynamic Regular Expression

by jwkrahn (Abbot)
on Dec 10, 2020 at 02:19 UTC ( [id://11124923]=note: print w/replies, xml ) Need Help??


in reply to Dynamic Regular Expression

^K1_(\w*\d*)$|^ASC_(\w*\d*)$|^GEB_(\w*\d*)$|N1_(\w*\d*)$.

In your example K1, ASC and GEB are anchored at the beginning of the string while N1 is not. How do you determine which strings should match at the beginning of the string?

Your pattern ends with a . which will match any character except after the end of the string!

Replies are listed 'Best First'.
Re^2: Dynamic Regular Expression
by Pratikh (Initiate) on Jan 06, 2021 at 15:54 UTC
    Sorry, It was my mistake. N1 is also anchored. Thank you for noticing the mistake and thank you for your help.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11124923]
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: (6)
As of 2024-04-19 16:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found