I wish there was a sed-like tool that used python or javascript regex syntax!
The Sed FAQ
11–15 of 15 posts
Re: The Sed FAQ
#12I always have problems when running sed, especially with capture groups. I can never get the syntax right for non-trivial stuff. I wish there was a sed-like tool that used python or javascript regex syntax!
Re: The Sed FAQ
#13I always have problems when running sed, especially with capture groups. I can never get the syntax right for non-trivial stuff. I wish there was a sed-like tool that used python or javascript regex syntax!
perl -pe is my usual replacement for stuff where I want a sed-like filter but PCRE syntax.
Also see a2p (awk to perl) and find2perl.
Re: The Sed FAQ
#14I always have problems when running sed, especially with capture groups. I can never get the syntax right for non-trivial stuff. I wish there was a sed-like tool that used python or javascript regex syntax!
perl -pe is my usual replacement for stuff where I want a sed-like filter but PCRE syntax.
Re: The Sed FAQ
#15My favourite use case is when ssh complains about a host key being changed. I just substitute the offending line number into this: sed -i d ~/.ssh/known_hosts and I'm done. Obviously I don't do that thoughtlessly otherwise I'd just disable ssh hosts checking altogether.