Splunk Search

How to use $ symbol in a view

ChhayaV
Communicator

Hi,

How to escape/ or use $ symbol from (?PERROR\s-\s[^\n\r]+?(?=\s[0-9]|$|[\n\r])) regex which is in below
view

View :

 <module name="URLLoader" layoutPanel="panel_row1_col1" group="Details" autoRun="True">
    <module name="Search">
        <param name="search">index="mwrap_idx"  sourcetype="CARApp" $excep$ | rex field=_raw "(?P<test>ERROR\s-\s[^\n\r]+?(?=\s[0-9]|$|[\n\r]))" | rename test as Exception | lookup Lookupcarexcep.csv  "Logged Text" AS Exception OUTPUT "Display Text" | table "Display Text" Exception _raw</param>
        <module name="SimpleResultsTable">
            <param name="entityName">results</param>
            <param name="drilldown">row</param> 

            <module name="ConvertToDrilldownSearch">
              <module name="ViewRedirector">
              <param name="viewTarget">flashtimeline</param>
              <param name="popup">True</param>
              </module>
          </module>

It is giving me "Unbalanced quotes" error

Tags (3)
0 Karma

ChhayaV
Communicator

yeah i tried putting "\"(slash). it didn't work.
But "$$" (two dollars back to back)works 🙂

0 Karma

somesoni2
Revered Legend

try putting "\" before the $.

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

You could try using CDATA. CDATA allows "raw" text in xml.

<param name="search"><![CDATA[index="mwrap_idx" sourcetype="CARApp" $excep$ | rex field=_raw "(?P<test>ERROR\s-\s[^\n\r]+?(?=\s[0-9]|$|[\n\r]))" | rename test as Exception | lookup Lookupcarexcep.csv "Logged Text" AS Exception OUTPUT "Display Text" | table "Display Text" Exception _raw]]></param>

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

Did this work for you? if so, please mark as accepted. Thanks!

ChhayaV
Communicator

I'll try the CDATA. i didn't know this. Thank you alacercogitatus

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 ...