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
Missing terminator ] for class
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
-
- Posts: 988
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Re: Missing terminator ] for class
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.
so []abc] is allowed.
Personally I don't like it.
-
- Posts: 988
- Joined: Sun Dec 09, 2007 2:49 am
- Location: UK
Re: Missing terminator ] for class
Yep! I agree.
For that pattern it would be more consistent to have [\]abc].
For that pattern it would be more consistent to have [\]abc].
David