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. It may include spaces but i don't want to count the spaces.
Should not match: "foo bar baz" (should count 9)
Should not match: "a a" (should count 2)
Should match: "foo baz bars" (should count 10, match whole string)
This is what i came up with, but it counts the whole thing:
((?<=\s)*\w(?=\s)*){10}
Edit I do not want to include spaces for counting. Sorry I edited this a few times, I didn't describe it correctly.
Any ideas on this?