How can I match the number of words per line and then 5 using regex?
Input1: stack over flow => the regex will not match anything
Input2: stack over flow stack over => the regex will match this string
I tried counting spaces with /\/s/, but that did not help me because I only needed to match strings without words> 5
Also I do not want to use spaces split.
source
share