I want to find (with reg expression) all files+folders with odd numbers of opening and closing brackets.
That means that the following files should be found for example:
blah blah ( one two)) end.pdf
some.other ( file name ().txt
How should a regular expression look like?
The regexp should pay attention to the sequence of opening and closing brackets too.
So the file
asfdaf ( sdg sdgfsd )) sfgg ( sgsdf.dat
has the same number of opening and closing brackets but the sequence does not fit.
How to find (with reg expression) all files+folders with odd numbers of opening and closing brackets?
Re: How to find (with reg expression) all files+folders with odd numbers of opening and closing brackets?
Not possible with regex.
Please try the following search:
2 levels of nesting with regex:
3 levels:
Please try the following search:
REGEXCOUNT($name:,"\(")!=REGEXCOUNT($name:,"\)")
2 levels of nesting with regex:
regex:\((?:[^()]*|\([^()]*\))*$
3 levels:
regex:\((?:[^()]*|\([^()]*\)|\((?:[^()]*|\([^()]*\))*\))*$