Splunk Search

Rex command help

mpk_24
Explorer

Hey @Splunkers,

Looking for valuable insights for this use case.

 

I wanted to extract the numbers at the end of the log (highlighted in bold). Pls help.

Sample log:

74.133.120.000 - LASTHOP:142.136.168.1 - [19/May/2025:23:30:12 +0000] "GET /content/*/residential.existingCustomerProfileLoader.json HTTP/1.1" 200 143 "/cp/activate-apps?cmp=dotcom_sms_selectapps_111324" "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Mobile Safari/537.36" 384622

Labels (1)
0 Karma
1 Solution

liangliang
Explorer

you can try this   (?P<number>\d+)$  
the $ will match the end of this line

View solution in original post

mpk_24
Explorer

@liangliang thank you so much for your respond. This works. Appreciate very much.  

0 Karma

liangliang
Explorer

you can try this   (?P<number>\d+)$  
the $ will match the end of this line

Get Updates on the Splunk Community!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...