Hi,
Iam trying to build a decoder of a log file which contains fields like that <30>.
So my regex to match is <\d+>.*
I have tried different ways to escape the < and > chracters but no luck.
I have tried to simplicfy the my "log-file" and my decoder to just decoder the <30> part of the log file:
used a backslash to escape < and >:
<decoder name="ubiquiti-switch-decoder-parent">
<prematch>^Switchdata : </prematch>
</decoder>
<decoder name="ubiquiti-switch-decoder">
<parent>ubiquiti-switch-decoder-parent</parent>
<regex type="pcre2">SwitchData : \<\d+\>.*</regex>
<order>severity</order>
</decoder>
used < and > to escape < and >:
<decoder name="ubiquiti-switch-decoder-parent">
<prematch>^Switchdata : </prematch>
</decoder>
<decoder name="ubiquiti-switch-decoder">
<parent>ubiquiti-switch-decoder-parent</parent>
<regex type="pcre2">SwitchData : < \d+>.*</regex>
<order>severity</order>
</decoder>
used \< and \> to escape < and >:
<decoder name="ubiquiti-switch-decoder-parent">
<prematch>^Switchdata : </prematch>
</decoder>
<decoder name="ubiquiti-switch-decoder">
<parent>ubiquiti-switch-decoder-parent</parent>
<regex type="pcre2">SwitchData : \< \d+\>.*</regex>
<order>severity</order>
</decoder>
all solutions are not working. Any ideas how to escape < > the right way?
Thanks a lot