Export Log between 2 string

Tags:

#1 RGO

Hi,

New to nxlog i don't even know where to search for that kind of needs...

SFB is a Microsoft UC client with several hundred Mo logs per day. I need to extract only a few information between strings for each PC. How can i achieve that ??

For Exp i need to extract this spécific info between those delimiters : <v3:Density>0.004195841</v3:Density>

Thanks for any help.

#2 Zhengshi Nxlog ✓
#1 RGO

Hi,

New to nxlog i don't even know where to search for that kind of needs...

SFB is a Microsoft UC client with several hundred Mo logs per day. I need to extract only a few information between strings for each PC. How can i achieve that ??

For Exp i need to extract this spécific info between those delimiters : <v3:Density>0.004195841</v3:Density>

Thanks for any help.

Regex is your friend! There are many places in the manual that show this kind of work. [Here for instance.](https://nxlog.co/documentation/nxlog-user-guide#processing_parsers_common_combined) In this example we are rewriting the entire parsed $message with the results of what is between those tags. Capture groups are there so we can address them directly and only take what we want. if $raw_event =~ /(\)(.*)(\)/ { $message = $2; }