UndernetIRC/ircu2

Broken match() behavior with certain masks including escaped wildcard characters

miwob opened this issue · 1 comments

miwob commented

If a mask has leading wildcard characters followed by an escaped wildcard, for example *\*, one would expect this mask to match against foo*, which it doesn't. In fact it does match against any string containing a backslash character, which assumedly can't be intended behavior, as the backslash is only used as an escaping character in this case.

The same applies to the ? wildcard. For a mask of ???\?, it would be expected to have a match against foo?, which again isn't the case, but there's a match against foo\?.

If this is not intended behavior, and is going to be corrected, the backslash character should be allowed to be escaped by itself, to allow masks like *\\*to be matched against any string containing a \.

miwob commented

Apparently things work like expected with the * wildcard character before changes have been made in aaa00fb. The example with ? doesn't work there, too.