Search found 53 matches

by zimxavier
28 Oct 2019 06:16
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 1925528

Re: JREPL.BAT v8.4 - regex text processor with support for text highlighting and alternate character sets

Hi! I would like to extract all strings between curly brackets after FUNCTION input.txt FUNCTION = {} FUNCTION = { value1 value2 value3 } FUNCTION = { value4 value5 } WRONG1 = {wrong1} FUNCTION = { value6 value7 value8} WRONG2 = {wrong2} FUNCTION ={value9 value10 value11} FUNCTION ={value12 value13 ...
by zimxavier
30 May 2019 05: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: 1925528

Re: JREPL.BAT v8.1 - regex text processor with support for text highlighting and alternate character sets

Hi! My curent script: 1) extract "string" from file1 to file2 call JREPL "^(string)\b" "$txt=$1" /jmatchq /f "file1.txt" >> "file2.txt" 2) remove the same "string" from file1 call JREPL "^(string)\r\n" "" /i /m /f file1.txt /o - Can I do it in one go? Currently, the first step is a copy-paste , and ...
by zimxavier
14 Nov 2017 09:15
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 1925528

Re: JREPL.BAT v7.8 - regex text processor now with Unicode and XRegExp support

1) There is no simple JREPL emulation of FINDSTR /G at the moment. But it is something that I have thought about in the past. I'm already working on a new JREPL release. Now that you have requested a solution, I think I will extend the /K and /R options to allow reading a set of search strings from...
by zimxavier
12 Nov 2017 06:41
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 1925528

Re: JREPL.BAT v7.7 - regex text processor now with Unicode and XRegExp support

Hi :) 1. Is there a way to avoid the buggy findstr with /g parameter using JREPL? (I use /r parameter for avoiding a nasty bug even if my strings are literal, and it is very slow) Maybe jmatchq? And \v parameter? 2. I would like to extract some strings from inside brackets and after "function" in on...
by zimxavier
09 Aug 2017 01:15
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 1925528

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

Hi, I have a case a bit complicated. I would like to replace a list of strings in some files with another list from a file. It is like an update. In fact, strings are syntax variables for Sublime Text. TEMP\all_quests.txt (containing strings only, one per line) new_quest1 new_quest2 new_quest3 new_q...
by zimxavier
08 Aug 2017 01:00
Forum: DOS Batch Forum
Topic: Quick way to extract data from multiples lines and many files using jrepl?
Replies: 3
Views: 4568

Re: Quick way to extract data from multiples lines and many files using jrepl?

After a good night's sleep, I believe I found it: @echo off ( for %%F in ( "C:\game\decisions\*.txt" "C:\game\events\*.txt" "C:\game\common\scripted_effects\*.txt" ) do ( type "%%F" echo( ) )|BATCH_JREPL "^[^#\n]*?(?:\bset_variable|\bchange_variable)\s*=[...
by zimxavier
07 Aug 2017 08:50
Forum: DOS Batch Forum
Topic: Quick way to extract data from multiples lines and many files using jrepl?
Replies: 3
Views: 4568

Re: Quick way to extract data from multiples lines and many files using jrepl?

Thank you Dave #ROOT = { change_variable = { which = current_potion_quality value = 1 } } Actually, in that case I want to extract current_potion_quality , because it is read by the game (not in root scope, but the syntax is correct). Only the extra final curly bracket is always wrong and breaks the...
by zimxavier
07 Aug 2017 03:11
Forum: DOS Batch Forum
Topic: Quick way to extract data from multiples lines and many files using jrepl?
Replies: 3
Views: 4568

Quick way to extract data from multiples lines and many files using jrepl?

I would like to extract all values of which from hundred files but only when it is a parameter of set_variable or change_variable . These functions can be on one line or several. Commented functions are excluded. Example: ROOT = { change_variable = { which = current_potion_quality value = 1 } } chan...
by zimxavier
02 Jun 2017 08: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: 1925528

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

Normally (without /M) JREPL reads and processes one line at a time, and the terminating \r\n is not included in the string. So of course searching for \n is pointless. But \r\n automatically gets restored when the resultant line is written. As stated in the documentation, the only way to productive...
by zimxavier
30 May 2017 02:27
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 1925528

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

I answer to myself. It might help other persons. 1) I didn't realise that >> works here for %%F in ("decisions\*.txt") do ( call BATCH_JREPL "(advisor_id\s*=\s*)([A-Za-z0-9_-]+)" "$txt=$2" /jmatchq /f "%%F" >> "TEMP\file.txt" ) 2) $txt= need to be in...
by zimxavier
19 May 2017 03:20
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 1925528

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

Hi! 1) I want to extract ^([ ]{4}|\t)([A-Za-z0-9_-]+) from files. I use this code: for /f "delims=" %%a in ('dir /b /a-d "decisions\*.txt" ') do ( call BATCH_JREPL "^([ ]{4}|\t)([A-Za-z0-9_-]+)" "$txt=$2" /jmatchq /f "decisions\%%~a" /o "TEMP\%%...
by zimxavier
16 Apr 2017 12:37
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 1925528

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

Hi! How can you search a line break with inc option ? I read that \m is incompatible with \inc This code does nothing: @echo off for /f "delims=" %%a in ('dir /b /a-d "GAME\*.txt" ') do ( call JREPL "\n" "|" /inc "/^BEGIN$/+1:/^END$/-1" /x /f "G...
by zimxavier
09 Apr 2017 08:38
Forum: DOS Batch Forum
Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
Replies: 550
Views: 1925528

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

Hi! I use JREPL 6.6 1. I need to extract all lines from the first to the 1500th. I use \inc option but it doesn't work. (ERROR: invalid option) call JREPL ".*" "$0" /jmatch /INC: "1:1500" /f file.txt /o - I tested for replacing and same result: call JREPL ".*"...