Splunk Search
Highlighted

extract field using rex

Path Finder

Hello All
I have used below rex to get 585315 into field Username

(?<=User\.\.\.\.\.\.\............).*?(?=\s) 

to get the data from below text...But the field is not getting created

|User and Transaction                                                                              |
|    Client................. 800                                                                   |
|    User.................. 585315                                                                 |
|    Language key.......... E                                                                      |
|    Transaction.........                                                                          |
|    Transaction ID...... 6A9AD4E6F80FF182A1BB00155DAA4A02                                         |
|                                                                                                  |
|    EPP whole context ID...... 00155DAA4A021ED5BB8595808D9584B9                                   |
|    EPP connection ID........ 00000000000000000000000000000000                                    |
|    EPP call counter......... 0                                                                   |
|                                         

Please help

Thank you
Amarander Busireddy

Tags (2)
0 Karma
Highlighted

Re: extract field using rex

Super Champion

try this:

User.................. (?<Username>\d+)
0 Karma
Highlighted

Re: extract field using rex

SplunkTrust
SplunkTrust

This works in regex101.com

User\.+\s(?<user>\d+)
---
If this reply helps you, an upvote would be appreciated.

View solution in original post

0 Karma
Speak Up for Splunk Careers!

We want to better understand the impact Splunk experience and expertise has has on individuals' careers, and help highlight the growing demand for Splunk skills.