Splunk Search

How do I extract a new field from a table?

vinoth12
New Member

Hi, I extracted a field and am viewing it in a table. But some data has a comma (,) in between. I want to create a new column without the comma ** and whatever comes **after the comma should not be there in that field.

please help me to come up with a solution!

Tags (2)
0 Karma
1 Solution

woodcock
Esteemed Legend

Add this to your existing search:

... | rex field=YourExistingFieldName "^(?<YourNewFieldName>[^#]+)"

View solution in original post

0 Karma

woodcock
Esteemed Legend

Add this to your existing search:

... | rex field=YourExistingFieldName "^(?<YourNewFieldName>[^#]+)"
0 Karma

vinoth12
New Member

Hi woodcock,
I want it should get split only alphabets followed by a #, if a space is followed by a #. then i don't want to. can you please help me to do it

0 Karma

woodcock
Esteemed Legend

Like this:
... | rex field=YourExistingFieldName "^(?[^#\s]+)"

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

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