Skip to content
Tcl Source Code Artifact [9dc7b84acc]
Login

Artifact [9dc7b84acc]

Artifact 9dc7b84acc382811c81a1130e8c41e8fa5e011a77e494c74ef66694533ba5356:

Ticket change [9dc7b84acc] - Closed ticket [3d40c2da8175daba|3d40c2da81]: <i>regexp (?:a*b)+c indices wrong</i> plus 6 other changes by sebres on 2019-11-24 15:25:35.
D 2019-11-24T15:25:35.968
J closedate 2458812.14277741
J closer sebres
J icomment No.\r\n\r\nAlthough\sthe\ssub-expression\straverses\sover\sall\s<code>a</code>\s(and\sfinally\sover\sall\s<code>b</code>\swithout\s<code>a</code>),\sdespite\sthis\snot\scapturing\sit\sas\sa\sgroup\s-\sthe\swhole\sexpression\smatches\sall\scharacters\sto\sfirst\s<code>c</code>\sinclusive\sit.\r\n\r\nSo\sthe\sresult\s<code>{0\s8}</code>\sis\spretty\scorrect\s-\s<code>{0..4}</code>\s<code>aaaab</code>\swithin\sfirst\siteration\sby\s<code>a*b</code>,\s<code>{5..7}</code>\s<code>bbb</code>\swithin\ssecond\sto\s4th\siteration\sby\s<code>(a*b)+</code>\sand\sthen\sfinally\s<code>{8}</code>\s<code>c</code>.\r\n\r\nNote\sthat\s<code>(?:a*b)+</code>\sis\sneither\sa\slookahead\snor\sa\slookbehind\sassertion\s(which\sis\snot\simplemented\sin\stcl\sat\sall),\sso\sthe\swhole\smatch\sis\scaptured\sfor\swhole\sexpression.\r\n\r\nHow\sthe\siterations\sfor\sfirst\ssubexpression\slook,\sillustrating\sthis\sexample:\r\n<pre>\r\n\s\s\s\s%\sregexp\s-all\s-indices\s-inline\s{a*b}\saaaabbbbcc\r\n\s\s\s\s{0\s4}\s{5\s5}\s{6\s6}\s{7\s7}\r\n</pre>
J login sebres
J mimetype text/x-fossil-wiki
J resolution Invalid
J status Closed
K 3d40c2da8175daba83ef373c8b8d9e147744fe4c
U sebres
Z 272347a0712780a75ca2bb2cf810921d