Is there a way I can parse a multiple line value into one query? For example:
Port Type: 1000SX-260-1590-
3487
In this case I want the value for the query Port_Type to be 1000SX-260-1590-3487.
Is there a way I can parse a multiple line value into one query? For example:
Port Type: 1000SX-260-1590-
3487
In this case I want the value for the query Port_Type to be 1000SX-260-1590-3487.
This is a tricky situation. I'm attaching a response map that shows how to extract this using a pattern map. The example shows two ways:
example1: This is a pattern map that looks for "Port Type:" and then grabs the text on the remainder of the current line (after whitespace) and the stuff on the subsequent line. (Pattern tokens using custom regex's can span line boundaries.) This works, except that the resulting match contains the whitespace in the middle and newline, which you probably don't want. You could, however post-process that using script to remove the whitespace and newline.
example2: This is a pattern map that extracts the first and second portion separately, then uses a custom query to combine these two fragments into a single query called portType() that gets the final value with no whitespace. In this case, note that it will not correspond to a "blue box" in the response view, because it is a custom query. So if you want to add an analysis rule using this value, you'd need to use the corresponding match in the Queries view.
No one has followed this question yet.