#To perform multi-line matching, use the M modifier provided in JavaScript regular expressions.
You can try running the following code to perform multi-line matching -
<html> <head> <title>JavaScript Regular Expression</title> </head> <body> <script> var myStr = "Welcoming!"; var reg = /^ing/m; var match = myStr.match(reg); document.write(match); </script> </body> </html>
The above is the detailed content of How to perform multi-line matching using JavaScript RegExp?. For more information, please follow other related articles on the PHP Chinese website!