Search found 8 matches

by Nuvolarix
18 Jan 2016 04:04
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2010019

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

dbenham wrote:

Code: Select all

jrepl "^A$(?!\r?\nON$)" "$&\r\nON" /m /x /f before.txt /o after.txt
It works like a charme! So powerful... Thank you.
by Nuvolarix
16 Jan 2016 08:56
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2010019

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

Call jrepl "(^\s*<file name=\qApp On\q>\s*<icon>icon.ico</icon>\s*<path>App.exe</path>[ \t]*\r?\n)[[ \t]*\r?\n?" "$1 <Autorun>2</Autorun>\r\n " /m /x /f "%tmpd%\%~n0_ToInsert.txt" /o - John A. This sounds much more 'pro' ... but I still need something 'more': I don't w...
by Nuvolarix
15 Jan 2016 10:19
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2010019

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

Glad to be helpful, thank you for this great batch and for the tips :-)
by Nuvolarix
14 Jan 2016 09:25
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2010019

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

Thank you for reply @Squashman. Got it! The problem was the use of option /x jrepl "\x5b" ok /x /f test.txt /o - jrepl "\u005b" ok /x /f test.txt /o - They both give " JScript runtime error in Search regular expression: Expected ']' (...)" jrepl "\x5b" ok /f t...
by Nuvolarix
14 Jan 2016 05:00
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2010019

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

ok, not sure it's the best way to achieve the goal, but here a code which looks working: jrepl "(^\s*<file name=\qApp On\q>\s*<icon>icon.ico</icon>\s*<path>App.exe</path>[ \t]*\r?\n)" "\r\n <file name=\qApp On\q>\r\n <icon>icon.ico</icon>\r\n <path>App.exe</path>\r\n <Autorun>2</Autor...
by Nuvolarix
13 Jan 2016 03:26
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2010019

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

My best guess is your test file ends with the <Autorun> line, and the last line is not terminated with \n. Dave Benham It was exactly like that, I'm sorry I didn't understand by myself and thank you for the fix! You also were assuming right, the <Autorun> line ends with \n, except in my stupid test...
by Nuvolarix
12 Jan 2016 02:08
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2010019

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

You are right and to be precise I would like to remove that line in batch-1 and vice versa add it back in a batch-2 (which I was assuming to easily get by inverting the 'search' and 'replace' fields of batch-1 but now I guess it needs something different as well). Reading your code I must admit \r w...
by Nuvolarix
11 Jan 2016 03:40
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 2010019

Re: JREPL.BAT - regex text processor - successor to REPL.BAT

Hi Dave, this batch looks so cool, I'm trying to use it but I'm in trouble with multi-line and/or newline functions... I cannot figure out how to properly use /M /X and I guess mainly... \n This the exact string (multi-line) I should search for (included spaces and newlines): <file name="App On...