Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

TPIPE matching problem

I have a text file:
1058 No white space at start of line
bbbb1058 white space at start of line

Note: the bbbb in the above line represents blanks

I issue the command:
tpipe /input=test.txt /grep=3,1,0,0,0,0,0,0,^1058

and get

1 1058 No white space at start of line
2 bbbb1058 white space at start of line

Next do the command:
perl.exe -e "while (<STDIN>) {print $_ if m/^1058/"} <test.txt

and get:

1058 No white space at start of line

The second line does not get printed. It looks like tpipe is not handling the start of line matching character (^) the same way as perl does.

I am using ActiveState Perl:
This is perl 5, version 16, subversion 2 (v5.16.2) built for MSWin32-x64-multi-thread

TCC version is
TCC 15.01.52 x64 Windows 7 [Version 6.1.7601]

Is this considered a bug?

David McClelland
 
The TCC escape character '^' is not protected in this command as it is in the Perl command.
Code:
tpipe /input=test.txt /grep=3,1,0,0,0,0,0,0,^1058
Either double the '^' or quote the regex.
Code:
v:\> type test.txt
1058 No white space at start of line
  1058 white space at start of line

v:\> tpipe /input=test.txt /grep=3,1,0,0,0,0,0,0,^1058
1 1058 No white space at start of line
2  1058 white space at start of line

v:\> tpipe /input=test.txt /grep=3,1,0,0,0,0,0,0,^^1058
1 1058 No white space at start of line

v:\> tpipe /input=test.txt /grep=3,1,0,0,0,0,0,0,"^1058"
1 1058 No white space at start of line
 
The TCC escape character '^' is not protected in this command as it is in the Perl command.
Code:
tpipe /input=test.txt /grep=3,1,0,0,0,0,0,0,^1058
Either double the '^' or quote the regex.
Code:
v:\> type test.txt
1058 No white space at start of line
  1058 white space at start of line

v:\> tpipe /input=test.txt /grep=3,1,0,0,0,0,0,0,^1058
1 1058 No white space at start of line
2  1058 white space at start of line

v:\> tpipe /input=test.txt /grep=3,1,0,0,0,0,0,0,^^1058
1 1058 No white space at start of line

v:\> tpipe /input=test.txt /grep=3,1,0,0,0,0,0,0,"^1058"
1 1058 No white space at start of line
 
Back
Top
[FOX] Ultimate Translator
Translate