<?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 use rex to extract field before two symbols in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677407#M231637</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264828"&gt;@adamsobczykhsbc&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 &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 13 Feb 2024 14:31:44 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2024-02-13T14:31:44Z</dc:date>
    <item>
      <title>How to use rex to extract field before two symbols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677392#M231624</link>
      <description>&lt;P&gt;I have raw data like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Error=REQUEST ERROR | request is not valid.|","time":"1707622073040"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I want to extract "REQUEST ERROR | request is not valid." to a new field, so I try to use rex to match until |" with below query but it still only returns "REQUEST ERROR"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|rex field=_raw "Error\=(?&amp;lt;ErrDesc&amp;gt;[^|\"]+)" &lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 13:29:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677392#M231624</guid>
      <dc:creator>adamsobczykhsbc</dc:creator>
      <dc:date>2024-02-13T13:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to use rex to extract field before two symbols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677395#M231627</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264828"&gt;@adamsobczykhsbc&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex "Error\=(?&amp;lt;ErrDesc&amp;gt;[^\|]+\|[^\|]+)"&lt;/LI-CODE&gt;&lt;P&gt;that you can test at&amp;nbsp;&lt;A href="https://regex101.com/r/mIlDeU/1" target="_blank"&gt;https://regex101.com/r/mIlDeU/1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 13:38:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677395#M231627</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-02-13T13:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to use rex to extract field before two symbols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677397#M231629</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;, it works for that specific case, however my extracted field ErrDesc will not always have pipe "|" inside, basically I want to match anything until |" , no matter if pipe is in the field or not&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 13:43:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677397#M231629</guid>
      <dc:creator>adamsobczykhsbc</dc:creator>
      <dc:date>2024-02-13T13:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use rex to extract field before two symbols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677398#M231630</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264828"&gt;@adamsobczykhsbc&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;could you share some sample of your logs (both cases)?.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 13:51:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677398#M231630</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-02-13T13:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use rex to extract field before two symbols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677399#M231631</link>
      <description>&lt;P&gt;I just figured it out with guidance from&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/7124778/how-can-i-match-anything-up-until-this-sequence-of-characters-in-a-regular-exp" target="_blank"&gt;https://stackoverflow.com/questions/7124778/how-can-i-match-anything-up-until-this-sequence-of-characters-in-a-regular-exp&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;correct rex will be&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|rex field=_raw "Error\=(?&amp;lt;ErrDesc&amp;gt;.+?(?=\|\"))"&lt;/LI-CODE&gt;&lt;P&gt;thanks for help!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 14:00:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677399#M231631</guid>
      <dc:creator>adamsobczykhsbc</dc:creator>
      <dc:date>2024-02-13T14:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to use rex to extract field before two symbols</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677407#M231637</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/264828"&gt;@adamsobczykhsbc&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 &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Feb 2024 14:31:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-rex-to-extract-field-before-two-symbols/m-p/677407#M231637</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2024-02-13T14:31:44Z</dc:date>
    </item>
  </channel>
</rss>

