Capturing parens aren't recognized as capturing inside strings interpolated into regexes #95

Closed
masak opened this Issue Dec 27, 2011 · 0 comments

2 participants

@masak
Collaborator
<sorear> niecza: my $hello = "'/'hello'/'(<-[\\\\/\\\\.]>+)"; my $reg  = / ^ <hello=$hello> $/; "/hello/bug" ~~ $reg; say $/<hello>[0];
<p6eval> niecza v13-1-gbfba5a3: OUTPUT«Any()␤»
<sorear> niecza: my $hello = "'/'hello'/'(<-[\\\\/\\\\.]>+)"; my $reg  = / ^ <hello=$hello> $/; "/hello/bug" ~~ $reg; say $/;
<p6eval> niecza v13-1-gbfba5a3: OUTPUT«#<match from(0) to(10) text(/hello/bug) pos([].list) named({"hello" => #<match 
                from(0) to(10) text(/hello/bug) pos([].list) named({}.hash)>}.hash)>␤»
<sorear> niecza: my $hello = "'/'hello'/'(<-[\\\\/\\\\.]>+)"; my $reg  = / ^ <hello=$hello> $/; "/hello/bug" ~~ $reg; say $/<hello>;
<p6eval> niecza v13-1-gbfba5a3: OUTPUT«#<match from(0) to(10) text(/hello/bug) pos([].list) named({}.hash)>␤»
<sorear> oh
<sorear> it's not being recognized as a capturing operator :|
* masak submits nieczabug

The expectation being, of course, that there be a $/[0] with a match capturing "bug" in it.

@sorear sorear closed this in 88d20b0 Dec 27, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment