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

Document regex replacement strings behavior. #139

Closed
wants to merge 3 commits into from

Conversation

dcsobral
Copy link
Contributor

All replacement methods use dolar signs to identify groups in the
matched string, and backslashes to escape characters. Document this
behavior, and provide a method that can be used to properly quote
replacement strings when this behavior is not desired.

Closes SI-4750.

All replacement methods use dolar signs to identify groups in the
matched string, and backslashes to escape characters. Document this
behavior, and provide a method that can be used to properly quote
replacement strings when this behavior is not desired.

Closes SI-4750.
* interpreted as a reference to a group in the matched pattern, with numbers
* 1 through 9 corresponding to the first nine groups, and 0 standing for the
* whole match. Any other character is an error. The backslash (`\`) character
* will be interpreted as a escape character, and can be used to escape the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "will be interpreted as an escape character"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@paulp
Copy link
Contributor

paulp commented Mar 23, 2012

Merged.

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

Successfully merging this pull request may close these issues.

4 participants