Skip to content
Tcl Source Code Artifact [c16a5516e0]
Login

Artifact [c16a5516e0]

Artifact c16a5516e06ef91768e4410655534a28745bf215:

Ticket change [c16a5516e0] - Ticket [1901640fffffffff|1901640fff] <i>Regexp error</i> status still Open with 4 other changes by dkf on 2008-02-27 17:46:16.
D 2008-02-27T17:46:16
J icomment Logged\sIn:\sYES\s\nuser_id=79902\nOriginator:\sNO\n\nIt\scan't\smatch\spast\sthat\sfirst\scolon\ssince\sno\sbackslash\sis\sput\sfirst;\syour\sRE\swill\sonly\smatch\sit's\sfirst\spart\sup\sto\sthe\sfirst\scolon\swithout\sa\s\\\sbefore\sit,\sregardless\sof\sthe\sgreediness.\sIndeed,\sin\sthe\snon-greedy\scase\sit\scould\sactually\sstop\sat\sthe\sfirst\scolon\seven\sif\sthere\sis\sa\s\\\sin\sfront\sof\sit!\sThat\sfirst\sclause\sshould\sbe\sgreedy\sfor\sall\sRE\sengines\s(try\smatching\sit\sagainst\ssome\sreal\sexamples\sif\syou\sdon't\sbelieve\sme).\n\nThe\srest\sof\sit\sstems\sfrom\sthe\sfact\sthat\sthe\sTcl\sRE\sengine\sis\san\sautomata-theoretic\sengine\sthat\sincludes\sa\sstrong\soptimization\sstep,\sallowing\sTcl\sto\sefficiently\smatch\sthings\sthat\sother\sadvanced\sRE\sengines\s(which\stend\sto\suse\srecursive\smatchers\sbehind\sthe\sscenes)\sdon't\shandle\swell\sat\sall.\sThis\smeans\sthat\sthe\sTcl\sRE\sengine's\sinterpretation\sof\s(non-)greediness\sswitching\sis\ssometimes\ssurprising.\sIt's\salmost\salways\sthe\sright\sthing\sto\sjust\suse\sbetter\sgreedy\sREs\sand\sget\sthe\sanchoring\scorrect;\syour\sRE\sis\svirtually\sthere\salready.\s:-)\n
J login dkf
J mimetype text/plain
J username dkf
K 1901640fffffffffffffffffffffffffffffffff
U dkf
Z a083b79b0a4c066c78564dcb8bb6672b