这是我到目前为止所做的事情,无论如何我都不是正则表达专家.... 我需要能够全球匹配。 (/ g)
total-matched=\"([^\"]*)\"
total-matched="1618"
total-matched= "1618"
total-matched ="1618"
total-matched = "1618"
total-matched='1618'
total-matched= '1618'
total-matched ='1618'
total-matched = '1618'
答案 0 :(得分:2)
total-matched\s*=\s*(["'])(.*?)\1
total-matched
- 字面匹配\s*
- =
=
- 字面匹配\s*
- =
(["'])
- 匹配任一类型的引用,并记住它为\ 1 (.*?)
- 对于任何文本的非贪婪匹配,作为第2组捕获\1
- 与我们之前匹配的报价相同