Regex search and replace program

Is there a simple and easy program to search a text file and replace a string with a regular expression?

+3
source share
10 answers

To search: grep is simple and fast. Bundled with Linux, here's a version of Windows not sure about the Mac.

To replace: sed . Here's a version of Windows not sure about the Mac.

Of course, if you want to open a file and see its contents while searching and replacing, you can use emacs to do this. Or ConTEXT . Or vim . Or what you have;)

. .

+6

Perl , -i, -n, -p -e. . Perl Command Line Switches .

sed awk, , Perl . , Perl / .

+3

sed, - .

, "foo" "bar" input.txt...

sed -e 's/foo/bar/g' input.txt > output.txt
+2

: vim, emacs, EditPlus ..

+1

sed awk. sed & awk sed & awk pocket . , ...

+1

, ... GUI, regexxer. , sed, , .

+1

, . , , Windows, .

, Notepad2 , .

/ Ransack.

+1

emacs xemacs. . , /1 (/2 /3), , () . vi-emacs: vi . , .

. , , '\', RegExp...

0

NOt, , , , , : PowerGREP. , , .

0

WildGem: http://www.skytopia.com/software/wildgem

. , , . Regex, , .

:

Unlike similar programs, WildGem works quickly with a dual-partition display, and also updates or highlights matches in real-time input. The unique color-coded syntax makes it easy to find / replace text without worrying about the need to avoid special characters.

Here is a screenshot: Wildgem

0
source

Source: https://habr.com/ru/post/1698074/


All Articles