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
Legend

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
Legend

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
Legend

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!

Maximize the Value from Microsoft Defender with Splunk

 Watch NowJoin Splunk and Sens Consulting for this Security Edition Tech TalkWho should attend:  Security ...

This Week's Community Digest - Splunk Community Happenings [6.27.22]

Get the latest news and updates from the Splunk Community here! News From Splunk Answers ✍️ Splunk Answers is ...

Reminder! Splunk Love Promo: $25 Visa Gift Card for Your Honest SOAR Review With ...

We recently launched our first Splunk Love Special, and it's gone phenomenally well, so we're doing it again, ...