3 ms·
I 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 to
by nickporter 14y ago
I 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!
- _delirium 14y agoperl -pe is my usual replacement for stuff where I want a sed-like filter but PCRE syntax.
- emmelaich 14y agoYep, as soon as my sed gets even slightly complicated I reach for s2p (sed to perl translator). Also see a2p (awk to perl) and find2perl.
- james2vegas 14y agoPerl regexes are PCRE-like, PCRE regexes are Perl-like, they are not the same.