<i>string match & glob: close-bracket in character set</i> status still Open with 4 other changes
by
.
D 2026-10-19T17:43:27.214
J foundin 8.6.18,\s9.0.5,\s9.1.0
J icomment Still\spresent\sin\s8.6,\s9.0\sand\s9.1:\sthere\sis\sno\sway\sto\sinclude\sa\sclosing\sbracket\sin\sa\sset.\sBackslash\sis\snot\sspecial\sinside\sa\sset,\sand\s<tt><nowiki>{[]a]}</nowiki></tt>\snever\smatches\sanything.\sThe\sonly\sworkaround\swas\sa\srange\sending\sin\sthe\sclosing\sbracket,\swhich\salways\sincludes\sother\scharacters:\sthe\snarrowest\sone,\s<tt><nowiki>{[\\-]]}</nowiki></tt>,\salso\smatches\sa\sbackslash.\sAnd\ssuch\sranges\sare\swhat\s[219233ffff]\sremoves.\n\nProposed\sfix\sfor\s9.1\sin\sbranch\s[/timeline?r=glob-bracket-posix|glob-bracket-posix],\stogether\swith\s[219233ffff]:\sa\sclosing\sbracket\sright\safter\sthe\sopening\sone\sis\sa\smember\sof\sthe\sset,\sas\sin\sPOSIX\sand\sPython's\sfnmatch,\sso\s<tt><nowiki>{[]a]}</nowiki></tt>\smatches\s"]"\sor\s"a".\sSuch\spatterns\snever\smatched\sbefore,\sso\snothing\sthat\sworks\schanges.\sstring.n\snow\sdescribes\sboth\srules.\sTest\sstring-11.58.
J login serhiy.storchaka
J mimetype text/x-fossil-wiki
K 3556218fffffffffffffffffffffffffffffffff
U serhiy.storchaka
Z bffe4983e4768578cf7cc5b3269941a9