how to use regular expression in if condition in javascript code example Example: regex for strings with specific letters javascript let re = /ab+c/;