RegExp in FOR broken

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
The following FOR command worked for me until 15.00.34, but is broken now:

FOR %i IN ("::^20\d{10,10}.*.dat$") ECHO %i
201304142202_antares.dat

DIR /b "::^20\d{10,10}.*.dat$"
201304142202_antares.dat
201304152038_pcben.dat
201304152050_pcben.dat
201304161907_pcben.dat
201304171740_pcben.dat
201304172010_pcben.dat
 
#2
The following FOR command worked for me until 15.00.34, but is broken now:

FOR %i IN ("::^20\d{10,10}.*.dat$") ECHO %i
201304142202_antares.dat

DIR /b "::^20\d{10,10}.*.dat$"
201304142202_antares.dat
201304152038_pcben.dat
201304152050_pcben.dat
201304161907_pcben.dat
201304171740_pcben.dat
201304172010_pcben.dat
It seems OK here on Win7/32
Code:
v:\> FOR %i IN ("::^20\d{10,10}.*.dat$") ECHO %i
V:\203456789011.dat
V:\203456789012.dat
V:\203456789013.dat
V:\203456789014.dat

v:\> DIR /b "::^20\d{10,10}.*.dat$"
203456789011.dat
203456789012.dat
203456789013.dat
203456789014.dat
 
#4
A question ... nickles's FOR command resulted in an unqualified file name. Mine resulted in fully-qualified file names. What's the difference?
To put it another way, what's the difference below. One gives qualified names; the other doesn't.
Code:
v:\> FOR %i IN ("::av.*") ECHO %i
V:\avtemp.btm
V:\avtemp.btm.bak
 
v:\> FOR %i IN (::av.*) ECHO %i
avtemp.btm
avtemp.btm.bak
 
#5
Hi Vince,

thanks for your replies. The following BTM demonstrates my "problem" on two Windows 7, 64 bit systems with TCC 15.00.37:
----------------------------------------------
> 201304142202_antares.dat
> 201304152038_pcben.dat
> 201304152050_pcben.dat
> 201304161907_pcben.dat
> 201304171740_pcben.dat
> 201304172010_pcben.dat
FOR %i IN ("::^20\d{10,10}.*.dat$") ECHO %i
DIR /b "::^20\d{10,10}.*.dat$"
---------------------------------------------
 
#6
Using your exact example, I have no problem on Win 7/32. Rex will have to sort it out.
Code:
v:\> type nickles.btm
> 201304142202_antares.dat
> 201304152038_pcben.dat
> 201304152050_pcben.dat
> 201304161907_pcben.dat
> 201304171740_pcben.dat
> 201304172010_pcben.dat
FOR %i IN ("::^20\d{10,10}.*.dat$") ECHO %i
DIR /b "::^20\d{10,10}.*.dat$"

v:\> nickles.btm
V:\201304142202_antares.dat
V:\201304152038_pcben.dat
V:\201304152050_pcben.dat
V:\201304161907_pcben.dat
V:\201304171740_pcben.dat
V:\201304172010_pcben.dat
201304142202_antares.dat
201304152038_pcben.dat
201304152050_pcben.dat
201304161907_pcben.dat
201304171740_pcben.dat
201304172010_pcben.dat
 
#7
Well, that's strange. I downloaded TCC 32, executed it (still under Windows 7, 64 bit) w/o any tcmd.ini or tcstart.btm, but I keep getting my previous - wrong - results. Are you under Windows 7 32 bit, or did you run TCC 32 under Windows 7 64 bit like me in my latest attempt?
 
#8
Well, that's strange. I downloaded TCC 32, executed it (still under Windows 7, 64 bit) w/o any tcmd.ini or tcstart.btm, but I keep getting my previous - wrong - results. Are you under Windows 7 32 bit, or did you run TCC 32 under Windows 7 64 bit like me in my latest attempt?
I have Win7/32. I don't have Win7/64.