Dashboards & Visualizations

Scinder une chaine de caractères

hgallacier
New Member

Hello,

I have a tab with this field :

<p>GET /url1/url2?code1=11&code2=12&code3=13 HTTP/1.1</p>

I would like to split this field in 3 field code1, code2 and code3.

I tried with this splunk command :
<p>| rex field=message.jbosseap.access_log.http_request "codeRegate=(?<codeRegate>.*)""</p>
but it is not good.

How can I do this ?

Thank you!

Labels (2)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

That regular expression doesn't work because it's looking for a string ("codeRegate") that is not present in the field.  Try this command

| rex field=message.jbosseap.access_log.http_request "code1=(?<code1>\d+).*code2=(?<code2>\d+).*code3=(?<code3>\d+)"
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

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 ...