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.
我有这个锚标签标准
<a href = "\code.ixc">temp_file</a>
以这种方式列出的文件可能有 10 个。现在我想搜索“temp_file”字符串。我用了
<a href=\".*\">(?<name>.*)</a>
但它返回我 0 计数模式搜索。谁能帮我用正确的正则表达式来搜索这个字符串?
<a href\s=\s".*">(.*)<\/a>可能是一个起点。=您错过了必须转义的正斜杠周围的空格。"另一方面,通常不必转义(除非您在将正则表达式放入字符串的编程环境中使用它。(.*)可能会替换为(\w).
<a href\s=\s".*">(.*)<\/a>
=
"
(.*)
(\w)