Splunk Search

regular expression

sphiwee
Contributor

Can i get a regular expression to show TSK KUBHEKA v2.0.70 from the below extract





2020-10-13 17:24:15 [bp-[xxxxxxxxx]-completeMachineRun-2053693] HitService [INFO] Created typed run Run: id=2053695, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx name=AO TSK KUBHEKA v2.0.70 (verificationservice_VerificationFinalization) {size:0, status:READY_TO_PROCESS, rootRun:2c863fbe-7896-4e98-8f7f-7c79f930ab86, data:}

Labels (1)
0 Karma

inventsekar
SplunkTrust
SplunkTrust
| makeresults |eval log="2020-10-13 17:24:15 [bp-[xxxxxxxxx]-completeMachineRun-2053693] HitService [INFO] Created typed run Run: id=2053695, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx name=AO TSK KUBHEKA v2.0.70 (verificationservice_VerificationFinalization) {size:0, status:READY_TO_PROCESS, rootRun:2c863fbe-7896-4e98-8f7f-7c79f930ab86, data:}" | rex field=log "name\=\w+\s+(?<name_field>.*)\(" | table name_field

rex-name.jpg

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !

sphiwee
Contributor

im sorry please include 

(verificationservice_VerificationFinalization)
0 Karma

inventsekar
SplunkTrust
SplunkTrust

Please update that rex last part of the rex -  "\(" replace with "\{". 


EDIT - added  the image and edited the code

| makeresults |eval log="2020-10-13 17:24:15 [bp-[xxxxxxxxx]-completeMachineRun-2053693] HitService [INFO] Created typed run Run: id=2053695, xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx name=AO TSK KUBHEKA v2.0.70 (verificationservice_VerificationFinalization) {size:0, status:READY_TO_PROCESS, rootRun:2c863fbe-7896-4e98-8f7f-7c79f930ab86, data:}" | rex field=log "name\=\w+\s+(?<name_field>.*)\{" | table name_field

rex-name-new.jpg

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @sphiwee,

check if a regex like this can solve your problem:

| regex "name\=\w+\s+(?<my_field>.*)\s+v\d+\.\d+\.\d+"

that you can test at https://regex101.com/r/0eFSVC/1

Ciao.

Giuseppe

Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...