开发者

Regex match spefcific no of chars before colon and all after?

I have a feed in Yahoo Pipes and trying to match a colon, everything after the colon and a certain amount of characters before it.

Here's an example of what a normal piece of text looks like:

Charlie didn't know how to do re开发者_StackOverflow中文版gex Topics: charlie, bob, learning

What is bolded is what I would like to match, and the Topics: will always be the same whereas charlie, bob, learning will change depending on the feed item.

Thanks in advance.


.{6}:.*

Should match six characters, a colon and everything behind it.


If you think Topics will always be the same then match that explicitly:

Topics: (.*)

Just matching any six characters before a colon could give you unexpected results if another key is added later.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜