Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Help with regex

by hdb (Monsignor)
on Sep 19, 2014 at 06:00 UTC ( [id://1101155]=note: print w/replies, xml ) Need Help??


in reply to Help with regex

Remove all non-letter and non-digit characters from your header and then do a case-insensitive comparison. Something like

$header =~ s/[^a-zA-Z0-9]//g; if( $header =~ /header1|header2/i ) { ...

UPDATE: changed /I to /i

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-23 14:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found