开发者

Regex emit items containing less than 100 words?

开发者 https://www.devze.com 2023-03-08 05:15 出处:网络
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?

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

精彩评论

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