You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi there. I need some command for RegEx.
The pattern seems to work but there's still some little error
my inputfile looks like this:
09.05.2011 00:10:00 493.8
#stop
#start
#COV from CW 0.0
10.05.2011 00:10:00 493.9
Pattern:
"^"+
"([0-9]{2}\\.[0-9]{2}\\.[0-9]{4})"+
"[\\s|\\t]+"+
"([0-9]{2}:[0-9]{2}:[0-9]{2})"+
"[\\s|\\t]+"+
"([0-9\\.\\,\\-]+)"+
".*"
output is:
Line doesn't match: #stop
Line doesn't match: #start
Line doesn't match: #COV from CW 0.0
.----------+--------+-----.
| tLogRow_11 |
|=---------+--------+----![]()
|date |time |value|
|=---------+--------+----![]()
|09.05.2011|00:10:00|493.8 |
|10.05.2011|00:10:00|493.9 |
'----------+--------+-----'
what i want is to ignore, leave out, skip or s.th. like this on the strings
"#stop"
"#start"
"#COV from CW 0.0"
I'm workin on T.O. 4.2 - java
can s.o. help me out with the command?
thank you very much
Maik
Offline
Hi Maik
Just an idea, remove the lines starts with # from source file before use regex component to read the file. For example:
tFileInputFullRow--main-->tFilterRow--tFileOutputDelimited(generate a temp file)
|
onsubjobok
|
tFileInputRegex(read the temp file)--main-->tLogRow
|
onsubjobok
|
tFileDelete(delete the temp file if needed)
on tFilterRow, check the box 'use advanced module' and input the code:
!input_row.line.startsWith("#")
Best regards
Shong
Offline
Pages: 1