Jump to content
Changes to the Jaspersoft community edition download ×

tFileInputRegex, no match in Java but in Perl


DataD

Recommended Posts

Hi all,

 

to fetch a line in a log file to extract data,

I used the tFileInputRegex.

 

Besides other lines, the log file has line entries like this:

[2007-07-22 15:00:09.211 GMT] performance PERF-1100 some more perf data here ...

(131 lines with occurrences of PERF-1100)

 

I have set up a simple job that opens the file and pass it to the tFileInputRegex.

After that it just logs the match out with tLogRow.

For the tFileInputRegex RegEx property, I have specified "PERF-1100"

 

However, nothing is logged out and no match is found.

Debugging the java code, it steps through the log file lines correctly, and also properly instanciate the pattern:

java.util.regex.Pattern patterntFileInputRegex_1 = java.util.regex.Pattern.compile("PERF-1100");

 

However it never get a match in

if (!matchertFileInputRegex_1.matches()) ...

 

I even tried with the "GMT" pattern that occurs in each line of the log file, but no match ...

 

After that I tried the very same with pattern 'PERF-1100' as a Perl project and it returns matches However this time it appears that it returns too much matches. A different regex tool returns 131 matches, whereas with JasperETL I stopped the execution after more then 350 matches, still counting ...

Anybody experiencing the same?

Might this be a bug or some misconfiguration on my side?

 

Appreciate your help!

Best regards,

Daniel

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...