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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…