<?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: reverse regular expression to capture text started by end line and ending with begining of a character in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49513#M11882</link>
    <description>&lt;P&gt;I'm thinking of that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="imap" 
| rex field=_raw "(?ms)(?&amp;lt;capture&amp;gt;Total.*)^" 
| rex field=capture "-(?&amp;lt;dash&amp;gt;.*)" 
| rex field=dash "-(?&amp;lt;seconddash&amp;gt;.*)" 
| rex field=seconddash "-(?&amp;lt;thirddash&amp;gt;.*)"
| rex field=thirddash "-(?&amp;lt;fourthdash&amp;gt;.*)"
| rex field=fourthdash "-(?&amp;lt;fifthdash&amp;gt;.*)"
| rex field=fifthdash "-(?&amp;lt;sixdash&amp;gt;.*)"
| rex field=sixdash "-(?&amp;lt;sevendash&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it appear that is a long way to finish, The reverse order will make much more sense.&lt;/P&gt;</description>
    <pubDate>Wed, 28 Aug 2013 10:28:34 GMT</pubDate>
    <dc:creator>royimad</dc:creator>
    <dc:date>2013-08-28T10:28:34Z</dc:date>
    <item>
      <title>reverse regular expression to capture text started by end line and ending with begining of a character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49511#M11880</link>
      <description>&lt;P&gt;Is there a reverse regular expression that start with an end line and begin with a characters&lt;BR /&gt;
Example:&lt;BR /&gt;
I have a regular expression that i would like to use the same concept but in reverse order.&lt;BR /&gt;
Hereby the regular expression:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=_raw "(?ms)?&amp;lt;capture&amp;gt;Total.*)^"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I need to use the same concept but in reverse order without changing the subject , same characters &lt;CODE&gt;*,^&lt;/CODE&gt; If this is not possible i will learn something else but actually i prefer to do it with the same concept.&lt;/P&gt;

&lt;P&gt;Finding the last dash in capture in reverse order and going to the second dash with the right order not the reverse. &lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 09:10:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49511#M11880</guid>
      <dc:creator>royimad</dc:creator>
      <dc:date>2013-08-28T09:10:51Z</dc:date>
    </item>
    <item>
      <title>Re: reverse regular expression to capture text started by end line and ending with begining of a character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49512#M11881</link>
      <description>&lt;P&gt;It's a bit confusing. What do you mean by reverse in this case? Can you give us a specific example of what you want to do, because I think you're making this sound a bit more complicated than it needs to be &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 10:27:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49512#M11881</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-08-28T10:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: reverse regular expression to capture text started by end line and ending with begining of a character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49513#M11882</link>
      <description>&lt;P&gt;I'm thinking of that:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="imap" 
| rex field=_raw "(?ms)(?&amp;lt;capture&amp;gt;Total.*)^" 
| rex field=capture "-(?&amp;lt;dash&amp;gt;.*)" 
| rex field=dash "-(?&amp;lt;seconddash&amp;gt;.*)" 
| rex field=seconddash "-(?&amp;lt;thirddash&amp;gt;.*)"
| rex field=thirddash "-(?&amp;lt;fourthdash&amp;gt;.*)"
| rex field=fourthdash "-(?&amp;lt;fifthdash&amp;gt;.*)"
| rex field=fifthdash "-(?&amp;lt;sixdash&amp;gt;.*)"
| rex field=sixdash "-(?&amp;lt;sevendash&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But it appear that is a long way to finish, The reverse order will make much more sense.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 10:28:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49513#M11882</guid>
      <dc:creator>royimad</dc:creator>
      <dc:date>2013-08-28T10:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: reverse regular expression to capture text started by end line and ending with begining of a character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49514#M11883</link>
      <description>&lt;P&gt;Again, show an example. Including sample event. I've no idea what the text you're trying to match something against looks like.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 10:46:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49514#M11883</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-08-28T10:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: reverse regular expression to capture text started by end line and ending with begining of a character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49515#M11884</link>
      <description>&lt;P&gt;Also please make sure you get formatting in code blocks correct. Code blocks should be indented by 4 spaces at the start of each line. Without that, characters like &lt;CODE&gt;*&lt;/CODE&gt; will mess up the formatting and your regexes will not show as they should.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 10:46:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49515#M11884</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-08-28T10:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: reverse regular expression to capture text started by end line and ending with begining of a character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49516#M11885</link>
      <description>&lt;P&gt;Hm, I guess that you want to anchor the regex to the end of a string (with a &lt;CODE&gt;$&lt;/CODE&gt;). Something like this perhaps. Assuming that you have a field that contains;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;My powerful crane stands proudly, looking out over the building site as the sun sets. I really think it is beautiful. I love cranes.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To capture the last sentence the following regex will work;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=my_text "\.\s(?&amp;lt;last_sentence&amp;gt;[\w\s]+\.)$"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now the field &lt;CODE&gt;last_sentence&lt;/CODE&gt; has the value &lt;CODE&gt;I love cranes.&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;

&lt;P&gt;But as Ayn says, provide some sample events, and what you want to extract.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 11:02:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49516#M11885</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-08-28T11:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: reverse regular expression to capture text started by end line and ending with begining of a character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49517#M11886</link>
      <description>&lt;P&gt;Upvoted for "My powerful crane stands proudly"&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 11:20:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49517#M11886</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-08-28T11:20:56Z</dc:date>
    </item>
    <item>
      <title>Re: reverse regular expression to capture text started by end line and ending with begining of a character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49518#M11887</link>
      <description>&lt;P&gt;It is simply as that:&lt;BR /&gt;
Start with the end of a text and go to the last characters up, can this be done?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 11:42:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49518#M11887</guid>
      <dc:creator>royimad</dc:creator>
      <dc:date>2013-08-28T11:42:22Z</dc:date>
    </item>
    <item>
      <title>Re: reverse regular expression to capture text started by end line and ending with begining of a character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49519#M11888</link>
      <description>&lt;P&gt;Fair enough, an answer with about the same detail: yes, it can be done.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 13:55:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49519#M11888</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-08-28T13:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: reverse regular expression to capture text started by end line and ending with begining of a character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49520#M11889</link>
      <description>&lt;P&gt;Seconded - shut up and take my karma! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 13:58:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49520#M11889</guid>
      <dc:creator>rturk</dc:creator>
      <dc:date>2013-08-28T13:58:53Z</dc:date>
    </item>
    <item>
      <title>Re: reverse regular expression to capture text started by end line and ending with begining of a character</title>
      <link>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49521#M11890</link>
      <description>&lt;P&gt;+1 for the crane&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2013 18:18:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/reverse-regular-expression-to-capture-text-started-by-end-line/m-p/49521#M11890</guid>
      <dc:creator>Rob</dc:creator>
      <dc:date>2013-08-28T18:18:18Z</dc:date>
    </item>
  </channel>
</rss>

