<?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 write a Rex query that will ignore some characters and then extract the message? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659109#M227623</link>
    <description>&lt;P&gt;Is there a way to embed the same into this query?&lt;/P&gt;&lt;P&gt;rex field=logLine "(Error Occurred During Script|UnhandledException -&amp;gt;)(\s|\S)(?&amp;lt;errorMessage&amp;gt;.*)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This didn't work, but something like this?&lt;/P&gt;&lt;P&gt;rex field=logLine "(Error Occurred During Script|for job id \'\w*\d*\' :|UnhandledException -&amp;gt;)(\s|\S)(?&amp;lt;errorMessage&amp;gt;.*)"&lt;/P&gt;</description>
    <pubDate>Fri, 29 Sep 2023 18:02:58 GMT</pubDate>
    <dc:creator>Splunk235</dc:creator>
    <dc:date>2023-09-29T18:02:58Z</dc:date>
    <item>
      <title>How to write a Rex query that will ignore some characters and then extract the message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659097#M227614</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have error logs like the below. How can I write a Rex query to match both the logs and only extract the message after the first colon (:)? Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Sample Log lines:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Script exception for job id 'ABc12345' : Too many rows: 500.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Script exception for job id 'XyZ78943' : Too many DMLs: 20.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Results should be:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Too many rows: 500.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Too many DMLs: 20.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 17:06:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659097#M227614</guid>
      <dc:creator>Splunk235</dc:creator>
      <dc:date>2023-09-29T17:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a Rex query that will ignore some characters and then extract the message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659099#M227615</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261049"&gt;@Splunk235&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this regex:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "Script exception for job id \'\w*\d*\' : (?&amp;lt;message&amp;gt;[^\.]*)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/tJwzeA/1" target="_blank"&gt;https://regex101.com/r/tJwzeA/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 17:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659099#M227615</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-29T17:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a Rex query that will ignore some characters and then extract the message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659100#M227616</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Here is the try anywhere query for your requirement.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="Script exception for job id 'ABc12345' : Too many rows: 500."
| rex field=_raw ": (?&amp;lt;Extracted&amp;gt;.*)"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 17:42:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659100#M227616</guid>
      <dc:creator>Thulasinathan_M</dc:creator>
      <dc:date>2023-09-29T17:42:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a Rex query that will ignore some characters and then extract the message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659109#M227623</link>
      <description>&lt;P&gt;Is there a way to embed the same into this query?&lt;/P&gt;&lt;P&gt;rex field=logLine "(Error Occurred During Script|UnhandledException -&amp;gt;)(\s|\S)(?&amp;lt;errorMessage&amp;gt;.*)"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This didn't work, but something like this?&lt;/P&gt;&lt;P&gt;rex field=logLine "(Error Occurred During Script|for job id \'\w*\d*\' :|UnhandledException -&amp;gt;)(\s|\S)(?&amp;lt;errorMessage&amp;gt;.*)"&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 18:02:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659109#M227623</guid>
      <dc:creator>Splunk235</dc:creator>
      <dc:date>2023-09-29T18:02:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a Rex query that will ignore some characters and then extract the message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659165#M227634</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261049"&gt;@Splunk235&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;yes, you can test your regex and it runs.&lt;/P&gt;&lt;P&gt;let us know if we can help you more, or, please, accept one answer for the other people of Community.&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2023 06:28:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659165#M227634</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-09-30T06:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a Rex query that will ignore some characters and then extract the message?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659316#M227660</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261049"&gt;@Splunk235&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2023 16:40:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-Rex-query-that-will-ignore-some-characters-and/m-p/659316#M227660</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-10-02T16:40:07Z</dc:date>
    </item>
  </channel>
</rss>

