Splunk Search

Remove Wildcard from Field Name

makarand13
New Member

I have some ticketing data being imported into Splunk for analysis. There are a couple of field names with an asterix (*) in them.

Example - Priority*

How do I rename such a field to just "Priority", or a non-wildcard string? Thanks !!

Tags (1)
0 Karma

harishalipaka
Motivator
| transpose 
| replace "Priority*" with Priority 
| transpose header_field=column
Thanks
Harish
0 Karma

elliotproebstel
Champion

To build on this and make it rename all field names containing wildcards at once:

| transpose 
| rex field=column mode=sed "s/\*//g" 
| transpose header_field=column 
| fields - column
0 Karma

niketn
Legend

@makarand13 can you post raw events where such wildcard based fields exist?

The following could be a fix during search time however, you should rather fix it while indexing using SEDCMD

<yourBaseSearch>
|  eval priority='Priority*'
|  fields - Priority*
____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

elliotproebstel
Champion

Upvoting this especially to reinforce that the best solution is to fix while indexing!

0 Karma
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...