Javascript examples for RegExp:RegExp Match
Get two parts of a string after using regex matching
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/* w w w . j a v a 2 s . co m*/ var something="a<b>pple</b>"; var the_string = something.split(/\<\/?b\>/); console.log(the_string[0] + ", " + the_string[1]); }); </script> </head> <body> </body> </html>