PDA

View Full Version : URGENT - V2.5.1 filter fail


chrisjj
25-Sep-2007, 06:27 PM
I want to filter on filenames containing '[', but when I enter this in the Filters dialog, I get:

TRegExpr(comp): Unmatched [] (pos 4)

and the app hangs.

Any workaround gratefully received. Thanks.

Marjolein Katsma
26-Sep-2007, 01:27 AM
I want to filter on filenames containing '[', but when I enter this in the Filters dialog, I get:

TRegExpr(comp): Unmatched [] (pos 4)

Just a hunch: try escaping it by entering '\[' instead of just '['.

Aaron
26-Sep-2007, 10:24 AM
The reason you get the error message is because [ and ] are actually masking characters, much like a *. [az] Matches one of the characters within the set, a or z. A filter of just "[" is invalid, hence the error. Check the Help File-> File Filters -> Filtering by Name for more documentation on the different ways to use [].

for your particular issue you want to use something similiar to
*[[]*.*

by putting the [ inside of [], it looks for the [ character, like it would look for an a or z. The stars mean 'any characters'. So any number of characters can appear before the [, then any after it, then a period, then any extension.

If you have any other questions, just let us know.

chrisjj
26-Sep-2007, 05:28 PM
> The reason you get the error message is because [ and ]
> are actually masking characters

I'm guessing the crash is not likewise by design. :)

Perhaps you could file this as a bug.

> use something similiar to [[]*.*

That works great - thanks.

> by putting the [ inside of [], it looks for the [
> character

That would be worth mentioning in the Help.

Aaron
27-Sep-2007, 10:38 AM
It doesn't crash, but throws an error. This should be the case since the [ and ] are designed to be used in a pair and could not be interpreted individually. The error message's text, however, could use some improvement. I'll make note of it and add it to our tracking system.

The help file generally describes how to use [ and ], and that any character inside is then searched for. Adding the specific example of using them to look for a single bracket may be useful, but it will probably end up as a knowledge base article, rather than an addition (and need to update/wait for update) to the program.

chrisjj
01-Oct-2007, 05:39 PM
>It doesn't crash, but throws an error.

As I reported, the app hangs. If you're in any doubt, do please tell me what evidence will satisfy you.

> Adding the specific example of using them to look for a
> single bracket may be useful

Sorry to be unclear. My suggestion was not for this example, but for a mention of the (apparently only) method of escaping the special interpretation of [, essential to anyone seeking to search for [, single or otherwise.

Aaron
02-Oct-2007, 02:26 PM
Sorry, after testing and encountering the error, I had forgotten you mentioned that it hangs as well as throws a somewhat obtuse error message.

I did not encounter the hang, but it is something we can look into.

As for the help file, that would not be available until the next program update to version 2 is available. Since those don't come very often, I was just mentioning that this information will probably be put into our KB. Since MS has odd issues with support for chm (standard) help files in Vista, we are reworking our help file standard, and are looking at different strategies (such as better kb support).

Chris
02-Oct-2007, 02:37 PM
Chris,

I reproduced the hang after entering [ as the filter. I'll add it to our bug list to be fixed. Thanks for helping us track it down.

chrisjj
02-Oct-2007, 04:56 PM
My pleasure! Thanks Aaron and Chris.