Advertisement
Shailrshah

Finding if a String is appears in Another Stirng

Feb 27th, 2014
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3.     <title>Regular Expression</title>
  4. </head>
  5. <body>
  6.     <form name = "form">
  7.         Str1: <input type = "text" name = "str1" />
  8.         Str2: <input type = "text" name = "str2" />
  9.         <input type = "submit" value ="Str2 in Str1?" onClick = "alert(new RegExp(form.str2.value).test(form.str1.value));" />
  10.     </form>
  11. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement