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!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...