2. Use search (), which is used to retrieve the substring specified in the string or the substring matching the regular expression. No matching substring found, returning-1.
3. Use test (), and the test () method is used to retrieve the value specified in the string. Returns true or false.
4. Use the exec () and exec () methods to retrieve the matches of regular expressions in the string. Returns an array containing matching results. No match found, and the return value is empty.