<?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: need regex that extracts everything up to a specific character in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/What-regex-can-extract-everything-up-to-a-specific-character/m-p/642072#M16224</link>
    <description>&lt;P&gt;&lt;SPAN&gt;basesearch | rex field=field1 &lt;/SPAN&gt;&lt;SPAN class=""&gt;"^(?&amp;lt;field2&amp;gt;[^_]+)_"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 02 May 2023 22:08:58 GMT</pubDate>
    <dc:creator>abi2023</dc:creator>
    <dc:date>2023-05-02T22:08:58Z</dc:date>
    <item>
      <title>What regex can extract everything up to a specific character?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/What-regex-can-extract-everything-up-to-a-specific-character/m-p/642067#M16223</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I need assistance with writing a regex that extracts all characters upto the character "_" underscore.&lt;/P&gt;
&lt;P&gt;so, the data could look like this:&lt;/P&gt;
&lt;P&gt;field1:&lt;/P&gt;
&lt;P&gt;ABCD_1234234&lt;BR /&gt;EFG_12349879&lt;BR /&gt;HIJK_12349850&lt;/P&gt;
&lt;P&gt;And I would like to only see:&lt;/P&gt;
&lt;P&gt;ABCD&lt;BR /&gt;EFG&lt;BR /&gt;HIJK&lt;/P&gt;
&lt;P&gt;I tired this however it is not doing the trick:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;| regex field1 = "^.*?(?=\_)"&lt;BR /&gt;&lt;BR /&gt;regex101 seems to show it working but ... I must be missing something when converting it into splunk.&lt;/P&gt;
&lt;P&gt;Any help would be appreciated.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 13:50:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/What-regex-can-extract-everything-up-to-a-specific-character/m-p/642067#M16223</guid>
      <dc:creator>Steve_A200</dc:creator>
      <dc:date>2023-05-03T13:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: need regex that extracts everything up to a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/What-regex-can-extract-everything-up-to-a-specific-character/m-p/642072#M16224</link>
      <description>&lt;P&gt;&lt;SPAN&gt;basesearch | rex field=field1 &lt;/SPAN&gt;&lt;SPAN class=""&gt;"^(?&amp;lt;field2&amp;gt;[^_]+)_"&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 22:08:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/What-regex-can-extract-everything-up-to-a-specific-character/m-p/642072#M16224</guid>
      <dc:creator>abi2023</dc:creator>
      <dc:date>2023-05-02T22:08:58Z</dc:date>
    </item>
    <item>
      <title>Re: need regex that extracts everything up to a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/What-regex-can-extract-everything-up-to-a-specific-character/m-p/642183#M16231</link>
      <description>&lt;P&gt;Thank you, that worked exactly how I needed it to work.&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2023 19:47:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/What-regex-can-extract-everything-up-to-a-specific-character/m-p/642183#M16231</guid>
      <dc:creator>Steve_A200</dc:creator>
      <dc:date>2023-05-03T19:47:21Z</dc:date>
    </item>
  </channel>
</rss>

