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