I have been struggle to write regex that matches words longer than a given length within parentheses. First I thought I could do this with \(\w{a,}\) but I realize that it doesn’t match with words with white space (ab cd ef). All I want to do is find out any characters within parentheses longer than, for instance, 3 characters. How can I resolve this problem ?
I have been struggle to write regex that matches words longer than a given
Share
What is a word with white space?
if you want to match any character then use
..matches any character except newlinesBut be careful, this is greedy. it will match for example also
To avoid this you could do something like
See it here online on Regexr
[^)]means any character except a)