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

匹配以字母"p"结尾的任意字符串

要使用 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>
以上就是匹配以字母"p"结尾的任意字符串的详细内容。
其它类似信息

推荐信息