Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Regular Expression</title>
- </head>
- <body>
- <form name = "form">
- Str1: <input type = "text" name = "str1" />
- Str2: <input type = "text" name = "str2" />
- <input type = "submit" value ="Str2 in Str1?" onClick = "alert(new RegExp(form.str2.value).test(form.str1.value));" />
- </form>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement