mirror of
https://github.com/anklimov/lighthub
synced 2025-12-06 03:39:49 +03:00
Refactoring st3 (untested/uncomplete)
This commit is contained in:
11
sed.vbs
Normal file
11
sed.vbs
Normal file
@@ -0,0 +1,11 @@
|
||||
Dim pat, patparts, rxp, inp
|
||||
pat = WScript.Arguments(0)
|
||||
patparts = Split(pat,"/")
|
||||
Set rxp = new RegExp
|
||||
rxp.Global = True
|
||||
rxp.Multiline = False
|
||||
rxp.Pattern = patparts(1)
|
||||
Do While Not WScript.StdIn.AtEndOfStream
|
||||
inp = WScript.StdIn.ReadLine()
|
||||
WScript.Echo rxp.Replace(inp, patparts(2))
|
||||
Loop
|
||||
Reference in New Issue
Block a user