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!

Automatic Discovery Part 1: What is Automatic Discovery in Splunk Observability Cloud ...

If you’ve ever deployed a new database cluster, spun up a caching layer, or added a load balancer, you know it ...

Real-Time Fraud Detection: How Splunk Dashboards Protect Financial Institutions

Financial fraud isn't slowing down. If anything, it's getting more sophisticated. Account takeovers, credit ...

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...