in reply to Regular expression queston

since you are using *, which means 0 are more even if your doesnot match also it will return you true, So better go with +, And Use =~ whwnever you are using regular expression instead of = .