We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test case:
func TestReplaceRef(t *testing.T) { re := MustCompile("(123)hello(789)", None) res, err := re.Replace("123hello789", "\\1456\\2", -1, -1) if err != nil { t.Fatal(err) } if res != "123456789" { t.Fatalf("Wrong result: %s", res) } }
Result:
--- FAIL: TestReplaceRef (0.00s) regexp_test.go:775: Wrong result: \1456\2
The text was updated successfully, but these errors were encountered:
Which languages regex spec are you wanting this to be modeled after?
There are lots of features related to the $ replace syntax (https://msdn.microsoft.com/en-us/library/ewy2t5e0(v=vs.110).aspx) so the implementation is a bit more involved than just allowing \ or $ to start reference groups in replace strings.
$
\
Sorry, something went wrong.
Sorry, I confused and forgot that this package based on .NET regexp engine.
This issue may be closed.
No branches or pull requests
Test case:
Result:
The text was updated successfully, but these errors were encountered: