I have a text file and it is formated like this;
(1992){0103644}[00004]
(1999){0137523}[00019]
(1991){0103064}[00098]
(2001){0246578}[00103]
(2011){1399103}[00150]
What i am trying to do finding a variable (which is entered by user) inside this text. Variable had to be search between {} This is what i am trying;
setlocal EnableDelayedExpansion
set "SIRA=1"
set "TEST=103"
for /f "tokens=1-3 delims=(){}[]" %%a in ('findstr /irc:"\{[0-9]*!TEST![0-9]*\}" %MURL%') do (
set FISIM[!SIRA!]=%%a
set FYIL[!SIRA!]=%%b
set FIDD[!SIRA!]=%%c
set /a SIRA+=1
)
set /a SIRA-=1
for /l %%i in (1,1,!SIRA!) do call :_Yazdir "%%i" "!FISIM[%%i]!" "!FYIL[%%i]!" "!FIDD[%%i]!" "!SATIRRENGI!"
goto :EOF
it works ONLY if i write the variable inside the findstr (in this case its !TEST! replaced by 103). So is there a possible way to find it ?
PS: %MURL% contains the name of text file.
PS: :_Yazdir is the function that i use for print