Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript string contains multiple substrings

if (/term1|term2|term3/.test("your string")) {
   //your code
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #string #multiple #substrings
ADD COMMENT
Topic
Name
8+1 =