JavaScript Regular Expression OR
To specify an “OR” condition in JavaScript regular expressions, use the pipe character – |.
var StringToTest = “abc”;
var IsFound = /a|b/.test(StringToTest);
alert(IsFound);
The above statement returns true if ‘a’ or ‘b’ is in the test string.
April 24, 2007 at 11:35 pm
OH WOW. UBER