sed doesn't replace combination of name+parens+semicolon
See original GitHub issueNode version (or tell us if you’re using electron or some other framework):
v13.12.0
ShellJS version (the most recent version/Github branch you see the bug on):
v0.8.4
Operating system:
macOS 10.15.4 (19E287)
Description of the bug:
When running sed("-i", "someString();", "anything", "anyfile"), sed will not replace.
Is this intended behavior? Do I have to escape something? In JS replace this should work …
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
bash - sed doesn't replace all semicolons - Stack Overflow
Your original command with 's/\;/";"/' will only make one replacement, the first. Share.
Read more >Sed should be compatible with non-extended regex by default
See issue #995 shell.sed() can accept either a JavaScript RegExp object or ... sed doesn't replace combination of name+parens+semicolon #995.
Read more >Linux sed command help and examples - Computer Hope
Sed programs Commands within a script or script-file can be separated by semicolons (";") or newlines (ASCII code 10). Some commands, due to ......
Read more >replace first semicolon occurence - sed - Unix Stack Exchange
With regular expression how can select the first occurrence and replace for ";" I have the next command in sed: sed -i 's/;;/;/g'....
Read more >Sed - An Introduction and Tutorial - The Grymoire!
I've heard that combining the number with the g command does not work on The MacOS, and perhaps the FreeSBD version of sed...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Right, unix
seddefaults to unextended regex butshell.sed()defaults to something like extended regex (really, it’s whatever syntax the JavaScript RegExp constructor accepts). I filed #996 to track possibly changing the behavior in the future.Thanks. Great work btw 😃))