<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to handle \n in regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-handle-n-in-regex/m-p/542217#M153586</link>
    <description>&lt;P&gt;You need a couple more backslashes&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(message:\s(?&amp;lt;METADATA_ERROR&amp;gt;[^\\\\\n]+))&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 03 Mar 2021 17:16:03 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-03-03T17:16:03Z</dc:date>
    <item>
      <title>How to handle \n in regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-handle-n-in-regex/m-p/542201#M153585</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In some of the events, I have '\n' in the events :&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;message: org.springframework.jdbc.UncategorizedSQLException: CallableStatementCallback; uncategorized SQLException for SQL &amp;lt;{call XYZ_API.PROCESS_EVENT(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}&amp;gt;; SQL state &amp;lt;16000&amp;gt;; error code &amp;lt;20011&amp;gt;; ORA-00060: deadlock detected while waiting for resource\nORA-06512: at "ABC_OWNER.XYZ_API", line 5133\nORA-06512: at "ABC_OWNER.XYZ_API", line 2001\nORA-06512: at "ABC_OWNER.XYZ_API", line 6829\nORA-06512: at line 1\n; nested exception is java.sql.SQLException: ORA-00060: deadlock detected while waiting for resource\nORA-06512: at "ABC_OWNER.XYZ_API", line 5133\nORA-06512: at "ABC_OWNER.XYZ_API", line 2001\nORA-06512: at "ABC_OWNER.XYZ_API", line 6829\nORA-06512: at line 1\n'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although my regex (message:\s(?&amp;lt;METADATA_ERROR&amp;gt;[^\\\n]+)) &amp;nbsp;to extract until the first '\n' &amp;nbsp;appears in the event works :&lt;/P&gt;&lt;P&gt;&lt;A href="https://regex101.com/r/XwEg29/1" target="_blank"&gt;https://regex101.com/r/XwEg29/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;When I try on Splunk, it extracts only &amp;nbsp; '&lt;SPAN&gt;org.spri'&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do we need to handle \n differently in Splunk ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 16:09:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-handle-n-in-regex/m-p/542201#M153585</guid>
      <dc:creator>ppatkar</dc:creator>
      <dc:date>2021-03-03T16:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to handle \n in regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-handle-n-in-regex/m-p/542217#M153586</link>
      <description>&lt;P&gt;You need a couple more backslashes&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(message:\s(?&amp;lt;METADATA_ERROR&amp;gt;[^\\\\\n]+))&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 Mar 2021 17:16:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-handle-n-in-regex/m-p/542217#M153586</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-03-03T17:16:03Z</dc:date>
    </item>
  </channel>
</rss>

