Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Regex Search and Replace Program

Tags:

regex

search

Is there a simple and lightweight program to search over a text file and replace a string with regex?

like image 862
UnkwnTech Avatar asked Dec 05 '22 07:12

UnkwnTech


1 Answers

For searching: grep - simple and fast. Included with Linux, here's a Windows version, not sure about Mac.

For replacing: sed. Here's a Windows version, not sure about Mac.

Of course, if you want to actually open up a file and see its contents while you search and replace, you can use emacs for that. Or ConTEXT. Or vim. Or what have you. ;)

See also this question.

like image 169
Epaga Avatar answered Dec 21 '22 22:12

Epaga