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.
嗨,我是正则表达式和编程的新手。我在一个文本文件中想要搜索两个文字的第一次出现之间的任何东西(所有字符),即'html'和'http'。我尝试了很多表达,但没有成功。任何帮助将不胜感激。
你可以试试这个正则表达式,
(?<=html).*?(?=http)
使用sswitch 使点也匹配换行符。
s
解释:
(?<=html)
html
.*?
?
*
(?=http)
http