I'm trying to create an expression that matches anything between two whitespaces that does contain at least one -
but have no f** idea how to do that.
Trying things like (?&开发者_开发知识库lt;=\s)[A-Z0-9(\-)+]+(?=\s)
don't work at all...
Has anybody a good idea?
Try
(?<=\s)\S*-\S*(?=\s)
You might not even need the look ahead/behind:
\S*-\S*
may work just fine
精彩评论