问题
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