Regex Match Between

ぃ、小莉子 提交于 2020-01-17 07:02:28

问题


I have the following text

Ad:<font class=value>1234 Blues  </font>

Regex expression

value>([^<]+)

will match

value>1234 Blues  

What do I need to do for the match to only return

1234 Blues

using "value>" in the expression (to make the search more specific)?


回答1:


Although I agree with John Saunders, here is the answer to the question (or at least the one that I could come up with :)

<font[^>]*?>(.*?)\s*<\/font>


来源:https://stackoverflow.com/questions/8652039/regex-match-between

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!