Skip to content
New issue

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

boost::u32regex_replace() behavior when the string has a closing newline #175

Open
msi22 opened this issue May 18, 2022 · 0 comments
Open

Comments

@msi22
Copy link

msi22 commented May 18, 2022

It seems that boost::u32regex_replace() matches a newline with ^(.*)$ different when it is at the end of a string and not within the string.

Input: "line\nline\nline\n"
Regular expression: "^(.*)$"
Format: "Hallo\1"
Result: "Halloline\nline\nline\nHallo

Is this example intended to result in two matches and substitutions?

code.txt
output.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant