Skip to content

Multiline text replacement in files with regex.

License

Notifications You must be signed in to change notification settings

HaronK/replacer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

replacer

Replace text in files using regex pattern. Supports multiline pattern replacement.

Rust regex syntax is used.

This tool should be used for processing not very big text files (i.e. source code files).

For processing large number or big size files there are more suitable and performant tools like sed and awk.

$ replacer --help
replacer 0.1.1
Oleg Khryptul <okreptul@yahoo.com>
Replace text in the files using regex pattern.
Search in the specified file or in all files of the folder recursively.
Supports multiline pattern replacement.

USAGE:
    replacer [FLAGS] [OPTIONS] <text_pattern> [inputs]...

FLAGS:
    -h, --help         Prints help information
    -d, --show-diff    Show replaced or matched lines.
    -V, --version      Prints version information

OPTIONS:
    -f, --file <file_pattern>      Pattern string for the file name (rust regex).
    -r, --replace <replacement>    Replacement string (rust regex). Do only pattern matching if not specified.

ARGS:
    <text_pattern>    Pattern string for the text (rust regex).
    <inputs>...       Input files and/or starting directories. Searches in the current directory if not specified.

About

Multiline text replacement in files with regex.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages