Missing terminator ] for class

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
dfhtextpipe
Posts: 986
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Missing terminator ] for class

Post by dfhtextpipe »

If you add a Perl pattern restrict filter, and then enter just [ in the search pane,
then quite rightly you get a warning message that reads Missing terminator ] for class

If you then enter ] (such that the search pattern is the empty class [] ),
the warning message still reads Missing terminator ] for class

IMHO, the warning should change immediately to read Empty class.

It's a subtle bug though, because moving away from the filter and going back again, the incorrect warning disappears, leaving nothing in its place.

However, attempting to run the empty class [] filter does cause an error message popup. See attached image.

David
Attachments
Error message popup.
Error message popup.
David
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Missing terminator ] for class

Post by DataMystic Support »

I don't believe it is an error - PCRE allows a closing ] as the first character if the set is intended to include a ']'.

so []abc] is allowed.

Personally I don't like it.
dfhtextpipe
Posts: 986
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Missing terminator ] for class

Post by dfhtextpipe »

Yep! I agree.

For that pattern it would be more consistent to have [\]abc].
David
Post Reply