Quote:
Originally Posted by KevinH
Any search for words that returns non-words as matches is not useful.
|
Or a search for letters that returns non-letters as matches....
Or a search for numbers that returns non-numbers as matches ...
Regex purists may kick up their heels a bit, but they'll know deep down that from a practical standpoint, those kinds of (non)matches aren't useful 99 times out of 100.
If you want to count occurrences of a repeating pattern in a string, or file, or files, use an expression that looks for one or more repetitions, not zero or more.