<?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: Regex to extract from start until a specific character in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332759#M98996</link>
    <description>&lt;P&gt;I tried that before, does not work. This is very simple and I have done more complex regex but this very obvious rex returns empty values for string...&lt;/P&gt;</description>
    <pubDate>Tue, 12 Sep 2017 16:36:07 GMT</pubDate>
    <dc:creator>Sukisen1981</dc:creator>
    <dc:date>2017-09-12T16:36:07Z</dc:date>
    <item>
      <title>Regex to extract from start until a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332757#M98994</link>
      <description>&lt;P&gt;I have a test field in a CSV called description:&lt;BR /&gt;
Completed changes are not shown as complete in channels for a while Actualstart: 2017-05-15 06:40:34&lt;BR /&gt;
I want to extract everything from the start of the string until I encounter Actualstart.&lt;BR /&gt;
I do not know how long the sub string before Actualstart is going to be , but I need to extract from start until Actualstart is reached.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 16:14:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332757#M98994</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-09-12T16:14:46Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract from start until a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332758#M98995</link>
      <description>&lt;P&gt;This should do it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=description "(?&amp;lt;string&amp;gt;.*?)Actualstart" | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 12 Sep 2017 16:22:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332758#M98995</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-09-12T16:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract from start until a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332759#M98996</link>
      <description>&lt;P&gt;I tried that before, does not work. This is very simple and I have done more complex regex but this very obvious rex returns empty values for string...&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 16:36:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332759#M98996</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-09-12T16:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract from start until a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332760#M98997</link>
      <description>&lt;P&gt;Hi  Sukisen1981,&lt;BR /&gt;
try something like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your_search
| rex "^(?&amp;lt;string&amp;gt;.*)Actualstart"
| ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 17:16:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332760#M98997</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-12T17:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract from start until a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332761#M98998</link>
      <description>&lt;P&gt;nope Giuseppe ..doesn't work ..tried that before as well..BTW what does your rex mean? are you tying to extract FROM the description field or in general and i tied both options without luck.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 18:01:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332761#M98998</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-09-12T18:01:20Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract from start until a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332762#M98999</link>
      <description>&lt;P&gt;The regex works fine on regex101.com.  Can you share a complete event and your full query?  Are you sure there is a field called 'description'?&lt;/P&gt;</description>
      <pubDate>Tue, 12 Sep 2017 18:41:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332762#M98999</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-09-12T18:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract from start until a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332763#M99000</link>
      <description>&lt;P&gt;I tried it on regex101.com and it runs (see &lt;A href="https://regex101.com/r/G6sRG9/1"&gt;https://regex101.com/r/G6sRG9/1&lt;/A&gt;), could you share an example to test it again?&lt;BR /&gt;
Anyway my regex says to take in "String" field all the chars from the beginning of the row until the word "Actualstart".&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 06:22:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332763#M99000</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-13T06:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract from start until a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332764#M99001</link>
      <description>&lt;P&gt;tomec error on mos order 4006, location is ok, but numberseries 24034800-4899 = 100 numbers has failed towards tomec.&lt;/P&gt;

&lt;P&gt;Actual start: 2017-09-08 11:54:46&lt;/P&gt;

&lt;P&gt;Business impact:&lt;/P&gt;

&lt;H1&gt;? Customers 100000 numbers is Down no Calls in or out.&lt;/H1&gt;

&lt;P&gt;here is a sample the description field. Now, the issue is not because of Actual start vs Actualstart...I had removed \s+ from description. Is it because of the space between the text and Actual Start?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 06:54:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332764#M99001</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-09-13T06:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract from start until a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332765#M99002</link>
      <description>&lt;P&gt;tomec error on mos order 4006, location is ok, but numberseries 24034800-4899 = 100 numbers has failed towards tomec.&lt;/P&gt;

&lt;P&gt;Actual start: 2017-09-08 11:54:46&lt;/P&gt;

&lt;P&gt;Business impact:&lt;/P&gt;

&lt;H1&gt;? Customers 100000 numbers is Down no Calls in or out.&lt;/H1&gt;

&lt;P&gt;here is a sample the description field. Now, the issue is not because of Actual start vs Actualstart...I had removed \s+ from description. Is it because of the space between the text and Actual Start?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 06:54:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332765#M99002</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-09-13T06:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract from start until a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332766#M99003</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
The problem is the multi line, try this regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "(?ms)^(?&amp;lt;string&amp;gt;.*)\s+Actual start"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and test it at &lt;A href="https://regex101.com/r/G6sRG9/2"&gt;https://regex101.com/r/G6sRG9/2&lt;/A&gt;&lt;BR /&gt;
Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 07:18:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332766#M99003</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-09-13T07:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract from start until a specific character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332767#M99004</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;It works now! thanks a lot . I had forgotten although in splunk it looks like there are no gaps, the description field is indeed multi lined.&lt;/P&gt;

&lt;P&gt;Many thanks once again , I am accepting the answer&lt;/P&gt;</description>
      <pubDate>Wed, 13 Sep 2017 07:32:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-to-extract-from-start-until-a-specific-character/m-p/332767#M99004</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2017-09-13T07:32:15Z</dc:date>
    </item>
  </channel>
</rss>

