JSREF
JavaScript String match()
A search for "ain" using a string: