Dashboards & Visualizations

Regular expression in "|rex field" to return string between two single quotes (") after "text="?

Builder

Hi,

We need to extract text after "description=" between two single quotes (") into a  new field "my_description":

,description="Env: Application: Upgrade App  from 1.0.0 to 2.0.0 on server myserver.mydomain.com. This is being done to support the upcoming upgrade to Patch 3 release.

All changes and post implementation verification will be done.
This has been tested successfully .",

we used the following search extraction that works for majority of events but on rare occasions it is not extracting.
Any suggestions?

| rex field=_raw ",my_description=\W(?<description>.*?)\W," ,

 

Labels (1)
Tags (3)
0 Karma

Champion
Hi,
Those variables are in wrong order:

| rex field=_raw ",description=(?<my_description>[^\"]+)"

You could check these with https://regex101.com
0 Karma