szuecs / stringreplace

replaces a string without evaluating regexp for cases where sed is a pain to use

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

For everyone that doesn't want to deal with complex escape sed syntax and wants to find and replace regular expressions in files.

@ is the magic separator. Need something else? Create a PR or change it in the file.

% go build -o stringreplace main.go
% cat file1
([.])?(:[0-9]+)?)$")
% ./stringreplace '(:[@foo' file1
% cat file1
([.])?foo0-9]+)?)$")

About

replaces a string without evaluating regexp for cases where sed is a pain to use

License:Apache License 2.0


Languages

Language:Go 100.0%