Javascript Search() Function

The match() function of string object find first substring based on specified reguler expression. If match found it return the index of first match, else return -1. Use it for example to search substring in specified string that matches reguler expression.

Syntax

Javascript String Search() Function Example1

Javascript String Search() Function Example2