D 2015-05-18T08:24:54.258 J closedate 2457160.85062799 J icomment Added\stext\s(post-render):\r\n
\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\sNOTE:\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{1,1}?\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.\sIt\spays\sto\sexperi‐\r\n\s\s\s\s\s\s\s\s\s\s\s\s\s\sment\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“abc”\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“a”\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”,\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
J login dkf J mimetype text/html K 11250a236da29e6badf7755a1b67995defa5170f U dkf Z c12e992145c7b003097aab5a7611c958