Wednesday, 21 August 2013

Condition becomes true if the set is not contained in the string

Condition becomes true if the set is not contained in the string

What's wrong with
/^(?:if|else|for|while|do|switch|\}|return)$/.test(str)
If i wanted the regex to become true if it doesnt see an
if,else,for,while,do,switch and }

No comments:

Post a Comment