Splunk Search

How do I edit the syntax for my rex expression to extract the field from my sample data?

rgcox1
Communicator

Can't get the following to work:

rex field=updateTitle  "(?<patch>)KB\d*+"

Sample text:

Security Update for Lync 2010 X64 (KB3081087​)
Security Update for Microsoft Office 2010 (KB3054965) 32-Bit Edition
Update for Microsoft Office 2010 (KB3055042) 32-Bit Edition
Windows Malicious Software Removal Tool x64 - September 2015 (KB890830)
Update for Microsoft PowerPoint 2010 (KB3085513) 32-Bit Edition
Update for Microsoft Office 2010 (KB3055047) 32-Bit Edition
Security Update for Microsoft .NET Framework 4.5, 4.5.1 and 4.5.2 on Windows 7, Vista, Server 2008, Server 2008 R2 x64 (KB3074550)
0 Karma
1 Solution

somesoni2
Revered Legend

Try like this

rex field=updateTitle "(?<patch>KB\d+)"

OR

rex field=updateTitle "((?KB\d+)"

View solution in original post

0 Karma

somesoni2
Revered Legend

Try like this

rex field=updateTitle "(?<patch>KB\d+)"

OR

rex field=updateTitle "((?KB\d+)"

0 Karma

rgcox1
Communicator

Thx. Moving closing paren to end worked:

 rex field=updateTitle  "(?<KBnum>KB\d*+)"
0 Karma
Get Updates on the Splunk Community!

Fastest way to demo Observability

I’ve been having a lot of fun learning about Kubernetes and Observability. I set myself an interesting ...

September Community Champions: A Shoutout to Our Contributors!

As we close the books on another fantastic month, we want to take a moment to celebrate the people who are the ...

Splunk Decoded: Service Maps vs Service Analyzer Tree View vs Flow Maps

It’s Monday morning, and your phone is buzzing with alert escalations – your customer-facing portal is running ...