Page 1 of 1

Missing terminator ] for class

Posted: Sun Apr 07, 2013 6:21 pm
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

Re: Missing terminator ] for class

Posted: Tue Apr 09, 2013 9:20 pm
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.

Re: Missing terminator ] for class

Posted: Thu Apr 11, 2013 8:12 pm
by dfhtextpipe
Yep! I agree.

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