Filter Field

I have 3 files in a folder:

  1. some.fil
  2. another.fil
  3. andanother.fil

If I enter the string an* in a filter field box, items 2 and 3 are shown as expected.

If I enter the string ~an* in a filter field box, item 3 is shown whereas I'd expect to see only item 1.

Opus 9.1.3.5 on XP Pro. Filter Field settings are Files and Folders, Show, and Filter in Real Time.

Regards, AB

Try ~(an*)

Yes, I see it as well.
At first I thought both of us were doing something wrong,
but the more I look into it I see it truely is weird.
Your example is quite concise.
Not intending to confuse the thread I add these:

~adresults in 3.
~a
results in 1,2, and 3.
~ah* results in 2 and 3 .
~af* results in 1, 2, and 3.

Note:
I was writing this when Jon Posted.
@Jon
Yes, ~(an*) results in 1.

Thanks Jon.

The obvious next question is why the brackets are needed? The Pattern Matching Syntax section in the Help File simply says that..

~x This expression matches if the item x doesn’t match.

No mention of brackets.

I also notice that Partial Match does not work with a ~(string) construct.

Without Partial Match active, b[/b] and ~(an) are effective opposites of one another.

With Partial Match active, b[/b] and ~(an) are not opposites. In fact ~(string) matches everything when Partial Match is in play.

Regards, AB

I haven't looked in detail but I imagine the brackets are needed for the same reason they're needed in maths.

~an is ambiguous and could mean (~a)n or ~(an). Brackets make it explicit.

Think about what Partial Match does. It puts a * before and after the pattern.

(an) and ~(an) are opposites, as you say.

(an) and ~(an) are not opposites.

@Leo
In all fairness, I note you wrote that you haven't looked at this in detail yet.

I respectfully disagree though that Maths is a proper explanation of the need for parens or brackets as you refer to () characters.
We call it Mathematics or Math here, as I'm a North American.
In fact I never knew British English shortened Mathematics to the pseudo plural Maths before your post.

Well, it's a simple case of the end justifying the means.
~x isn't working and has no explicit meaning, but ~(x) does.
That proves the paren is mathematically necessary ???
If you find time and are curious, look closer at my examples.
There's more wrong here.

I think it's a bug.
I also think Sir Isaac and Steve Hawking would think so too.

That's incorrect. ~x works fine. It will filter out any file called "x" while leaving all other files. (Here x is a single character, not a placeholder for anything.)

Example:

x <-- filtered out
xx <-- not filtered out
a <-- not filtered out
aa <-- not filtered out

~x seems to work fine. It does exactly the same thing as ~(x) as well.

On the other hand:

~xy where you have two (or more) characters after the ~ is ambiguous and may not work the way people assume it does, unless the brackets are added.

Even ~xy works fine if you understand what it does, but you need the brackets to make it do what most people want, which is to exclude a string of characters.

Thanks Leo,
Obviously, I need to prove this for myself from the ground up.
When I can prove myself incorrect, I'll report back with my findings.

Using brackets to ensure the integrity of a filter makes sense. Maybe the Help file could be made a bit more explicit on this topic. I suspect I'm not the only one who has jumped to invalid conclusions.

Slightly OT Scred.. I suppose it's what you become used to hearing as you grow up but the North American use of math as an abbreviation for mathematics has always sounded wrong to my British educated ear.

Regards, AB