is there a standalone sed-like tool than can load whole file into memory, perform multiline regex on it and stdout it?

StackOverflow https://stackoverflow.com/questions/20313012

  •  06-08-2022
  •  | 
  •  

Question

I know I can use any of the scripting languages for it that is perl, python etc... but this means that I must install big package with all its dependencies while I need only regex feature and second I want it to be fast and portable, that is only regex engine and sdt streams compiled into the application, nothing more. Is there anything like it ?

Was it helpful?

Solution 4

Yes, there is program that does exactly what I was looking for:

https://sites.google.com/site/regexreplace/ - rxrepl, Regular Expression Search and Replace Command Line Tool, Version 1.3

enter image description here

OTHER TIPS

How about using:

Both are light and fast. Both have dependencies but light ones.

vbscript and powershell have native regex function and is part of windows dependeing version of it.

but this means that I must install big package with all its dependencies

How big is the package (binaries on 64bit Windows), used space on HDD:

Perl    109 MiB This is perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x64-multi-thread (ActiveState)
php      48 MiB PHP 5.5.5 (cli) (built: Oct 15 2013 11:47:27)
Python   48 MiB Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64 bit (AMD64)] on win32
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top