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}$
精彩评论