Splunk Search

Has any one come across hidden Double Quotes (") in a field and how to remove it?

ajdyer2000
Path Finder

Hi.

Has any one come across  hidden Double Quotes (") in a field and how to remove it? (maybe a "sed" regex)

The double quotes don't appear in the Splunk Field or even in an excel csv export.

It only appears when you save the csv as a txt file. 

Apparently Splunk sees it because it adds additional lines in my search.

See below for Excel export and corresponding saved txt 

It looks to be Quoting the contents of the AdminGroup field.  

csv

src_host AdminGroup
computer1 Domain Admins
LocalAdmins

 

Text file

src_host        AdminGroup
computer1 "Domain Admins
                           LocalAdmins"

 

Labels (4)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi @ajdyer2000,

you could use a regex like the following (if the values are in a field called "AdminGroup"):

| rex field=AdminGroup "^\"(?<AdminGroup>[^\"]+)\""

Ciao.

Giuseppe

View solution in original post

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @ajdyer2000,

you could use a regex like the following (if the values are in a field called "AdminGroup"):

| rex field=AdminGroup "^\"(?<AdminGroup>[^\"]+)\""

Ciao.

Giuseppe

0 Karma

ajdyer2000
Path Finder

Thank you  Giuseppe That Worked.

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @ajdyer2000 ,

good for you, see next time!

Ciao and happy splunking

Giuseppe

P.S.: Karma Points are appreciated 😉

0 Karma
Get Updates on the Splunk Community!

Database Performance Sidebar Panel Now on APM Database Query Performance & Service ...

We’ve streamlined the troubleshooting experience for database-related service issues by adding a database ...

IM Landing Page Filter - Now Available

We’ve added the capability for you to filter across the summary details on the main Infrastructure Monitoring ...

Dynamic Links from Alerts to IM Navigators - New in Observability Cloud

Splunk continues to improve the troubleshooting experience in Observability Cloud with this latest enhancement ...