Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我希望 BBEdit 搜索一些 HTML 并匹配每个包含文本字符串(如“myText”)的段落标签。
这种工作但通常匹配超出标签的结束“>”。
<p.*myText[^>]*>
据我了解,这应该匹配左尖括号-“p”,然后是任意数量的字符,直到找到“myText”,然后是任意数量的非“>”字符,直到找到关闭的“>”。怎么了?
使用<p\s[^>]*myText[^>]*>——来自Wiktor Stribiżew的评论。
<p\s[^>]*myText[^>]*>