Filter for capitals does not work

Hi, If [A-Z] finds capitals and [A-Z]{4} should find 4 capitals, why doesn't

"$if($eql($regexp(%title%,[A-Z]{4},),%title%),yes,no)" IS no

work?

Oh, cos I have to put the expression in ' expression ', like...

"$if($eql($regexp(%title%,'[A-Z]{4}',),%title%),yes,no)" IS no

But then shouldn't %title% MATCHES '[A-Z]{4}' do the same?

See the notes on filters:

All operations are non-case sensitive. All filter keywords must be uppercase

If you want to force the filter to take care of the case, try
%title% MATCHES (?-i)[A-Z]{4}

The exp %title% MATCHES '(?-i)[A-Z]{4}' shows all files... whereas
"$if($eql($regexp(%title%,'[A-Z]{4}',),%title%),yes,no)" IS no
shows the desired result

@djrip
Please use backticks or the code-symbol to enclose your format strings.


Source: Hints for asking Support Requests

Exactly.
And with
%title% MATCHES (?-i)[a-z]{4}
you would filter fo all titles with 4 following lowercase letters, at whatever position they occur in title

Thanks. I also discovered title MATCHES (?-i)\s[a-z] finds words that start with a lower case letter, regardless of position. Why is it that we can't filter case sensitive results using regex MATCHES.

I thought that @LyricsLover and me described 2 ways to do exactly that: filter case-sensitively which is switched on with (?-i)

(?i) starts case-insensitive mode
(?-i) turns off case-insensitive mode aka case-sensitive

You are searching for a whitespace character followed by a lowercase letter between a and z.
You don't define if it has to match at the start or the end of your content.