Reputation: 21
I want to write a grok pattern for something like 123-543, which is two numbers separated by a hyphen. I've written a grok %{NUMBER:num1}-%{NUMBER:num2} by escaping the hyphen but it's not working. Alsi attached a screenshot by testing it on a online grok debugger. Can someone help me? enter image description here
Upvotes: 0
Views: 1274
Reputation: 3392
Please find the grok pattern here:
%{INT:num1}\-%{INT:num2}
Output:
Upvotes: 1