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

Re^3: Regex in if statement

by 2teez (Vicar)
on Mar 18, 2014 at 21:09 UTC ( [id://1078862]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Regex in if statement
in thread Regex in if statemetn

Hi finfan,

..Doesn't seem to work. #MO and # MO do not match. Tried the regex tester at http://www.internetofficer.com/seo-tool/regex-tester/ and it says "no match"..

I know the code posted by toolic worked, I wanted to find out why it wasn't working on the website you mentioned. Tried it out and it worked with the following result:

Regular Expression Test Results Tested pattern: ^#\s*[a-z]+ Applied options: the comparison was case-insensitive String 1: #MO Result : true String 2: # MO Result : true String 3: #mo Result : true String 4: # mo Result : true String 5: # 555 Result : false
May be the question, one should be asking is: How are you doing these regexp?

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

Log In?
Username:
Password:

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

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

    No recent polls found