1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

RegExp in FOR broken

Discussion in 'Support' started by nickles, Apr 17, 2013.

  1. nickles

    Joined:
    Jun 24, 2008
    Messages:
    220
    Likes Received:
    0
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    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
     
  3. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    A question ... nickles's FOR command resulted in an unqualified file name. Mine resulted in fully-qualified file names. What's the difference?
     
  4. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    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. nickles

    Joined:
    Jun 24, 2008
    Messages:
    220
    Likes Received:
    0
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    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. nickles

    Joined:
    Jun 24, 2008
    Messages:
    220
    Likes Received:
    0
    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. vefatica

    Joined:
    May 20, 2008
    Messages:
    7,939
    Likes Received:
    30
    I have Win7/32. I don't have Win7/64.
     
  9. nickles

    Joined:
    Jun 24, 2008
    Messages:
    220
    Likes Received:
    0
    Rex, would you please comment on this?
     
  10. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,855
    Likes Received:
    83
    It's fixed in the next build (which will be uploaded in the next day or two).
     
  11. nickles

    Joined:
    Jun 24, 2008
    Messages:
    220
    Likes Received:
    0
    Thanks, Rex. It works here now (15.0.39).
     

Share This Page