Splunk Search

How do i extract field usinng regex .

bpot
Engager

Hi all,

I'm new to splunk and i had hard time extracting fields  using regex for the following example :
Class (six, seven)

Can someone help me with the above example , i want class as a field name and six,seven as two values for the field class.

Thanks for the help in Advance.

Labels (4)
0 Karma
1 Solution

thambisetty
SplunkTrust
SplunkTrust

| rex "Class\s+\((?<Class>[^\)]+)"

| makemv Class delim=","

| mvexpand Class

————————————
If this helps, give a like below.

View solution in original post

thambisetty
SplunkTrust
SplunkTrust

| rex "Class\s+\((?<Class>[^\)]+)"

| makemv Class delim=","

| mvexpand Class

————————————
If this helps, give a like below.

isoutamo
SplunkTrust
SplunkTrust

Good place to test these is https://regex101.com/

r. Ismo

0 Karma
Get Updates on the Splunk Community!

Monitoring Postgres with OpenTelemetry

Behind every business-critical application, you’ll find databases. These behind-the-scenes stores power ...

Mastering Synthetic Browser Testing: Pro Tips to Keep Your Web App Running Smoothly

To start, if you're new to synthetic monitoring, I recommend exploring this synthetic monitoring overview. In ...

Splunk Edge Processor | Popular Use Cases to Get Started with Edge Processor

Splunk Edge Processor offers more efficient, flexible data transformation – helping you reduce noise, control ...