<i>unexpected non greedy matching behaviour</i> status still Closed with 4 other changes
by
dkf
2015-05-18 08:24:54.
D 2015-05-18T08:24:54.258
J closedate 2457160.85062799
J icomment Added\stext\s(post-render):\r\n<pre>\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s<b>NOTE:</b>\s\sThis\s\smeans\s\sthat\syou\scan\susually\smake\sa\sRE\sbe\snon‐greedy\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\soverall\sby\sputting\s<b>{1,1}?</b>\safter\sone\sof\sthe\sfirst\s\snon‐constraint\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\satoms\sor\sparenthesized\ssub‐expressions\sin\sit.\s<i>It\spays\sto\sexperi‐</i>\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s<i>ment</i>\swith\sthe\splacing\sof\sthis\snon‐greediness\soverride\son\sa\ssuit‐\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\sable\s\srange\s\sof\sinput\stexts\swhen\syou\sare\swriting\sa\sRE\sif\syou\sare\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\susing\sthis\slevel\sof\scomplexity.\r\n\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\sFor\sexample,\sthis\sregular\sexpression\s\sis\s\snon‐greedy,\s\sand\s\swill\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\smatch\s\sthe\s\sshortest\ssubstring\spossible\sgiven\sthat\s“<b>abc</b>”\swill\sbe\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\smatched\sas\searly\sas\spossible\s(the\s\squantifier\s\sdoes\s\snot\s\schange\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\sthat):\r\n\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sab{1,1}?c.*x.*cba\r\n\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\sThe\s\satom\s\s“<b>a</b>”\s\shas\sno\sgreediness\spreference,\swe\sexplicitly\sgive\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\sone\sfor\s“<b>b</b>”,\sand\sthe\sremaining\squantifiers\sare\soverridden\sto\s\sbe\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\snon‐greedy\sby\sthe\spreceding\snon‐greedy\squantifier.\r\n</pre>
J login dkf
J mimetype text/html
K 11250a236da29e6badf7755a1b67995defa5170f
U dkf
Z c12e992145c7b003097aab5a7611c958