Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tFileInputRegex - processing lines where pattern does not match

I have a complex log file for which I use regex to separate parts of the log lines into separate fields:
<GREEN>You conjure a ring that glistens.
<GREEN>An aura of levity emanates from your ring.
You cast <highlight>Planar Gateway</color> on yourself.
You cast <highlight>Conjure Quicksilver Ring</color> on yourself.
<GREEN>You conjure a ring that flows.
<GREEN>A mercurial aura emanates from your ring.
Just as an example, I use (without additional JAVA escape characters):
\]+)] (.+) cast <+>(.+)<+> on (.+)\.
To get:
1=?19:59:53? 2=?You? 3=?Planar Gateway? 4=?yourself?
I thought the tFileInputRegex ?rejected? output stream would have all the rows which does not match the pattern but it seems I?m wrong. The rejected stream is empty.
Is this intended or am I doing something wrong that I don?t see any row in the rejected output stream?
Labels (3)
3 Replies
Anonymous
Not applicable
Author

Hi
I thought the tFileInputRegex ?rejected? output stream would have all the rows which does not match the pattern but it seems I?m wrong. The rejected stream is empty.

Because tFileInputRegex read the rows which does not match the pattern and get nothing, so the values of schema are null and the rejected stream is empty.
see some code 0683p000009MPcz.pngrow1 is main flow and row2 is reject flow)
	} catch (Exception e) {
whetherReject_tFileInputRegex_1 = true;
row2 = new row2Struct();
row2.id = row1.id;
row2.name = row1.name;
row2.errorMessage = e.getMessage();
row1 = null;
}

Best regards
shong
Anonymous
Not applicable
Author

Ok. I understand.
Is there a chance that with future versions this component could have an additional output stream with not matching rows?
Anonymous
Not applicable
Author

Hi
Is there a chance that with future versions this component could have an additional output stream with not matching rows?

Yes, you can report a new feature on our bugtracker.
Thanks for your support!
Best regards
shong