I want to count characters, but they may be separated by characters that do not match.
Here is an example. I want to match a text that has 10 or more word-characters
Use a group that consumes spaces with each single word char, and count the groups:
^(\s*\w){10,}\s*$