Dashboards & Visualizations

Scinder une chaine de caractères

New Member


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


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, an upvote would be appreciated.
0 Karma
*NEW* Splunk Love Promo!
Snag a $25 Visa Gift Card for Giving Your Review!

It's another Splunk Love Special! For a limited time, you can review one of our select Splunk products through Gartner Peer Insights and receive a $25 Visa gift card!


Or Learn More in Our Blog >>