Missing terminator ] for class

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

DFH
Posts: 654
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Missing terminator ] for class

Postby DFH » Sun Apr 07, 2013 6:21 pm

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
Missing ].png
Error message popup.

User avatar
DataMystic Support
Site Admin
Posts: 2164
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Missing terminator ] for class

Postby DataMystic Support » Tue Apr 09, 2013 9:20 pm

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.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

DFH
Posts: 654
Joined: Sun Dec 09, 2007 2:49 am
Location: UK

Re: Missing terminator ] for class

Postby DFH » Thu Apr 11, 2013 8:12 pm

Yep! I agree.

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


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 3 guests