匹配任何以 p 结尾的字符串。
htmljavascriptprogramming scripts更新于 2024/6/5 22:36:17
要使用 JavaScript RegExp 匹配任何以 p 结尾的字符串,请使用 p$ 量词。
示例
<html> <head> <title>JavaScript Regular Expression</title> </head> <body> <script> var myStr = "Welcome to our website! Welcome"; var reg = /me$/g; var match = myStr.match(reg); document.write(match); </script> </body> </html>
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

