您好,欢迎访问一九零五行业门户网

如何使用JavaScript RegExp执行多行匹配?

要执行多行匹配,请使用 javascript 正则表达式中提供的 m 修饰符。
示例您可以尝试运行以下代码执行多行匹配 -
<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>
以上就是如何使用javascript regexp执行多行匹配?的详细内容。
其它类似信息

推荐信息