- Nov
- 257
- 3
It's almost 2am, so maybe I'm seeing something, but something weird is happening whether I run a BTM in BDEBUGGER.
I'm migrating some scripts from a 2008 R2 TC 15 server that I am decommissioning and am testing the scripts on a new 2012R2 system running TC 16, this BTM previously worked on v15, but seems to fail oddly in v16.
TCC 16.00.41 x64 Windows Server 2012R2 [Version 6.3.9600]
TCC Build 41 Windows Server 2012R2 Build 9600
When run in BDEBUGGER:
When run in TCMD directly:
When I step through in BDEBUGGER, it completely skips over the %@regex lines. Even weirder, if I comment out the UNSET and SET commands at the top and leave the regex and pdffile variables set from a previous execution, the output of BDEUBGGER seems to be correct.
What am I missing here?
(And yes, the regex is a bit more complicated than it needs to be -- I intend on extracting the various groups and doing further matches once I determine whether we have a match or not)
I'm migrating some scripts from a 2008 R2 TC 15 server that I am decommissioning and am testing the scripts on a new 2012R2 system running TC 16, this BTM previously worked on v15, but seems to fail oddly in v16.
TCC 16.00.41 x64 Windows Server 2012R2 [Version 6.3.9600]
TCC Build 41 Windows Server 2012R2 Build 9600
Code:
set regex=\A(\d+)-\d\d\d\d\w\w\w\d\d-(\d\d\d\d)(\w\w\w)(\d\d)\.pdf$
set pdffile=4000000000000000-2014Jan21-2014Feb20.pdf
echo %%@regex[%%[regex],%%[pdffile]]
echo %%@regex[%[regex],%[pdffile]]
echo Regex: %@regex[%[regex],%[pdffile]]
set regexout=%@regex[%[regex],%[pdffile]]
set regexout
When run in BDEBUGGER:
%@regex[%[regex],%[pdffile]]
%@regex[\A(\d+)-\d\d\d\d\w\w\w\d\d-(\d\d\d\d)(\w\w\w)(\d\d)\.pdf$,4000000000000000-2014Jan21-2014Feb20.pdf]
TCC: C:\Users\DAVEAD~1\AppData\Local\Temp\test.btm [13] Not in environment "regexout*
When run in TCMD directly:
%@regex[%[regex],%[pdffile]]
%@regex[\A(\d+)-\d\d\d\d\w\w\w\d\d-(\d\d\d\d)(\w\w\w)(\d\d)\.pdf$,4000000000000000-2014Jan21-2014Feb20.pdf]
Regex: 1
1
When I step through in BDEBUGGER, it completely skips over the %@regex lines. Even weirder, if I comment out the UNSET and SET commands at the top and leave the regex and pdffile variables set from a previous execution, the output of BDEUBGGER seems to be correct.
What am I missing here?
(And yes, the regex is a bit more complicated than it needs to be -- I intend on extracting the various groups and doing further matches once I determine whether we have a match or not)