I'm looking for a way to find words with the exact number of the given character.
For example:
If we have this input: ['teststring1','strringrr','wow','strarirngr']
and we are looking for 4 r
characters
It will return only ['strringrr','strarirngr']
because they are the words with 4 letters r
in it.
I decided to use regex and read the documentation and I can't find a function that satisfies my needs.
I tried with [r{4}]
but it apparently returns any word with letters r in it.
Please help