<?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: Pull a field through regex in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Pull-a-field-through-regex/m-p/535984#M89867</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93912"&gt;@Nidd&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand: what's the&amp;nbsp;ErrorMessage you're serching for:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;all after "ErrorMessage=",&lt;/LI&gt;&lt;LI&gt;all until ":" one time,&lt;/LI&gt;&lt;LI&gt;all until ":" many times.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In the first case the regex it's easy:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ErrorMessage\=\s+(?&amp;lt;ErrorMessage&amp;gt;.*)&lt;/LI-CODE&gt;&lt;P&gt;and you can test it at&amp;nbsp;&lt;A href="https://regex101.com/r/7hAGRj/1" target="_blank"&gt;https://regex101.com/r/7hAGRj/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The second is similat to your:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ErrorMessage\=\s+(?&amp;lt;ErrorMessage&amp;gt;[^:]*)&lt;/LI-CODE&gt;&lt;P&gt;and you can test it at&amp;nbsp;&lt;A href="https://regex101.com/r/7hAGRj/2" target="_blank"&gt;https://regex101.com/r/7hAGRj/2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;the third requires two extractions:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "ErrorMessage\=\s+(?&amp;lt;FullErrorMessage&amp;gt;.*)"
| rex field=FullErrorMessage "(?&amp;lt;ErrorMessage&amp;gt;[^:$]*)(:|$)"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Fri, 15 Jan 2021 10:54:39 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2021-01-15T10:54:39Z</dc:date>
    <item>
      <title>Pull a field through regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pull-a-field-through-regex/m-p/535977#M89866</link>
      <description>&lt;P&gt;I have the following log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Number=Test1,Code=DPCA , ErrorMessage= sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to pull ErrorMessage from the log through regex but in vain. The field is not getting extracted. Below is the regex I'm using. Am I missing something? Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;rex "^(?:(?&amp;amp;lt;ErrorMessage&amp;amp;gt;[^,]*),){3}"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 10:30:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pull-a-field-through-regex/m-p/535977#M89866</guid>
      <dc:creator>Nidd</dc:creator>
      <dc:date>2021-01-15T10:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Pull a field through regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pull-a-field-through-regex/m-p/535984#M89867</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/93912"&gt;@Nidd&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;let me understand: what's the&amp;nbsp;ErrorMessage you're serching for:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;all after "ErrorMessage=",&lt;/LI&gt;&lt;LI&gt;all until ":" one time,&lt;/LI&gt;&lt;LI&gt;all until ":" many times.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In the first case the regex it's easy:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ErrorMessage\=\s+(?&amp;lt;ErrorMessage&amp;gt;.*)&lt;/LI-CODE&gt;&lt;P&gt;and you can test it at&amp;nbsp;&lt;A href="https://regex101.com/r/7hAGRj/1" target="_blank"&gt;https://regex101.com/r/7hAGRj/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The second is similat to your:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ErrorMessage\=\s+(?&amp;lt;ErrorMessage&amp;gt;[^:]*)&lt;/LI-CODE&gt;&lt;P&gt;and you can test it at&amp;nbsp;&lt;A href="https://regex101.com/r/7hAGRj/2" target="_blank"&gt;https://regex101.com/r/7hAGRj/2&lt;/A&gt;&lt;/P&gt;&lt;P&gt;the third requires two extractions:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "ErrorMessage\=\s+(?&amp;lt;FullErrorMessage&amp;gt;.*)"
| rex field=FullErrorMessage "(?&amp;lt;ErrorMessage&amp;gt;[^:$]*)(:|$)"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 10:54:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pull-a-field-through-regex/m-p/535984#M89867</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-15T10:54:39Z</dc:date>
    </item>
    <item>
      <title>Re: Pull a field through regex</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Pull-a-field-through-regex/m-p/535987#M89869</link>
      <description>&lt;P&gt;Thank you very much &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;! That worked ! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jan 2021 11:12:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Pull-a-field-through-regex/m-p/535987#M89869</guid>
      <dc:creator>Nidd</dc:creator>
      <dc:date>2021-01-15T11:12:17Z</dc:date>
    </item>
  </channel>
</rss>

