On Mon, Oct 19, 2015 at 08:33:51AM -0600, Karl Williamson wrote: > On 10/19/2015 08:26 AM, Abigail wrote: >> $ perl -wE '"aaaaaaaaaa" =~ /a { 1,10}/x; say $& // "UNDEF"' >> UNDEF >> $ >> >> (In this case, it tries to match the literal string "a{1,10}" -- one >> can wonder whether that's the most useful thing it could do). > > Note that this now give a warning, even without the '-w' command line > option: > > $ blead -E '"aaaaaaaaaa" =~ /a { 1,10}/x; say $& // "UNDEF"' > Unescaped left brace in regex is deprecated, passed through in regex; > marked by <-- HERE in m/a { <-- HERE 1,10}/ at -e line 1. > UNDEF > $ Yes, I know. Is that useful? I'd wager that of all the people who write /a { 1,10}/x more than 99.9% of want it to behave like /a {1,10}/x and none of them actually want to match the literal string "a{1,10}" Abigail (who has put a space after the , in /x{n,m}/ way too often).Thread Previous | Thread Next