<i>compiled regexp behaves differently</i> status still Open with 4 other changes
by
.
D 2026-10-11T07:39:52.068
J foundin 8.6.18,\s9.0.5,\s9.1.0
J icomment Still\sthe\ssame\sin\s8.6,\s9.0\sand\s9.1.\s<tt>TclCompileRegexpCmd()</tt>\scan\sonly\scheck\sa\sliteral\sRE\sfor\sa\sleading\s"-";\san\sRE\sfrom\sa\svariable\swent\sstraight\sto\s<tt>INST_REGEXP</tt>,\swhich\sdoes\snot\sparse\sswitches.\n\nI\sdisagree\swith\schanging\s<tt>regexp</tt>\sto\smatch\sthe\scompiled\sbehaviour:\scompilation\sis\sonly\san\soptimization,\sand\sthe\scompiled\scode\sshould\salways\sbehave\slike\sthe\sinterpreted\scommand.\sProposed\sfix\sin\sbranch\s[/timeline?r=regexp-compile-runtime-switch|regexp-compile-runtime-switch]:\swhen\sthe\sRE\sis\snot\sknown\sat\scompile\stime\sand\sthere\sis\sno\s<tt>--</tt>,\sthe\scompiled\scode\schecks\sat\sruntime\swhether\sit\sstarts\swith\s"-",\sand\sif\sso\scalls\s<tt>regexp</tt>\sitself.\sSo\scompiled\sand\sinterpreted\s<tt>regexp</tt>\snow\sbehave\sthe\ssame,\sincluding\s<tt>-about</tt>,\sand\sordinary\sREs\sstill\suse\s<tt>INST_REGEXP</tt>.\sTests\sregexpComp-25.1\sto\s25.7.
J login serhiy.storchaka
J mimetype text/x-fossil-wiki
K 1902890fffffffffffffffffffffffffffffffff
U serhiy.storchaka
Z f36a8ad8dbba39dc0b08d645b4c25144