<html> <body> <button onclick="var myS = new String('Sample String'); alert(myS.match(/sam/i));">String MATCH</button> </body> </html>