开发者

Regex emit items containing less than 100 words?

I want a rege开发者_开发问答x value that searches for the amount of words and selects all articles in a feed that are less than 100 words. Is this possible?

For example there are 3 RSS feed items. One of them contains 500 words while the others contain less than 100.

I need an expression that matches any item with less than 100 words?

Thanks


If by word you mean \w+ you can use a regex like:

^\W*(?:\w+(?:\W+|$)){0,100}$

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜