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

fix: better regex support for sed #110

Merged
merged 1 commit into from
Jan 8, 2017
Merged

Conversation

nfischer
Copy link
Member

@nfischer nfischer commented Dec 27, 2016

Now works with using the empty string as a replacement string

Some details on allowed regexes (in unix sed):

  • s/foo/bar/: the string must end in a slash (or with /g or something similar)
  • s/foo//: the replacement string is allowed to be empty
  • s/a/b/: the regex must be at least one character long
  • s/foo/bar\./g: the \. is treated as a literal dot
  • s/foo/bar./g: the . is also treated as a literal dot, when in the replacement string
  • s/foo./bar/g: the . is not treated literally when in the regex string
  • s/foo\//bar\//g: the \/ is treated as a literal / in either string

Fixes #109

Now works with using the empty string as a replacement string

Fixes #109
@nfischer nfischer added the fix label Dec 27, 2016
@nfischer nfischer added this to the v0.2.x milestone Dec 27, 2016
@nfischer nfischer requested a review from freitagbr December 27, 2016 04:45
@codecov-io
Copy link

codecov-io commented Dec 27, 2016

Current coverage is 100% (diff: 100%)

Merging #110 into master will not change coverage

@@           master   #110   diff @@
====================================
  Files           3      3          
  Lines          22     22          
  Methods         0      0          
  Messages        0      0          
  Branches        0      0          
====================================
  Hits           22     22          
  Misses          0      0          
  Partials        0      0          

Powered by Codecov. Last update 19c57ce...ef81e82

@nfischer
Copy link
Member Author

nfischer commented Jan 8, 2017

@freitagbr could you review?

@freitagbr
Copy link
Contributor

LGTM.

@freitagbr freitagbr merged commit e5d1166 into master Jan 8, 2017
@freitagbr freitagbr deleted the fix-sed-empty-string branch January 8, 2017 03:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants