Splunk Search

extract field using rex

722624
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
1 Solution

richgalloway
SplunkTrust
SplunkTrust

This works in regex101.com

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

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

This works in regex101.com

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

cmerriman
Super Champion

try this:

User.................. (?<Username>\d+)
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...