Splunk Search

Why am I getting an error when perform split with "\" delimiter

azleeshah
Explorer

username to split  - domain\user

expected result  for user2 field -         domain

                                                                              user

 

SPL - | eval user2=split(user,"\") 

 

error stated - unbalanced quotes

 

thanks for assistance

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The backslash character is the escape character.  To use a literal backslash you must escape it.

| eval user2=split(user,"\\")
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

The backslash character is the escape character.  To use a literal backslash you must escape it.

| eval user2=split(user,"\\")
---
If this reply helps you, Karma would be appreciated.

azleeshah
Explorer

@richgalloway  thanks - the spl works

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...