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

Sed should be compatible with non-extended regex by default #996

Open
nfischer opened this issue Apr 28, 2020 · 0 comments
Open

Sed should be compatible with non-extended regex by default #996

nfischer opened this issue Apr 28, 2020 · 0 comments

Comments

@nfischer
Copy link
Member

@nfischer nfischer commented Apr 28, 2020

See issue #995

shell.sed() can accept either a JavaScript RegExp object or a String as its search_regex parameter. We should consider the following behavior:

  • If it's a JavaScript RegExp, treat this as the pattern to use (don't try to reinterpret this value, just use it for matching).
  • If it's a String, treat this as if it's an unextended regex (which is how unix sed operates by default). Ex. ( and ) should match literal parentheses, and not denote a capture group.

The current behavior is to treat Strings like extended regular expressions.

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.