Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
want to to match a line from a text file:
in a tJavaRow:
output_row.line = input_row.line; String regex = "\\d{7}\\n"; java.util.regex.Matcher m = java.util.regex.Pattern.compile(regex).matcher(input_row.line); if(m.find()){ System.out.println(m.group(0).trim().substring(0,7)); }
this "\\n" doestn match the "LF", what could i do?
Hi,
it is because - if you (as usual) read file row by row, Talend already truncate this LF from the line (default line separator)
but if you test with tInputFileRow (don't forget to convert it to string) - regex will work
Hi,
it is because - if you (as usual) read file row by row, Talend already truncate this LF from the line (default line separator)
but if you test with tInputFileRow (don't forget to convert it to string) - regex will work
awesome! thank you!