<?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 write a transaction search where startswith starts with event A, while endswith must match a regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-transaction-search-where-startswith-starts-with/m-p/115110#M30450</link>
    <description>&lt;P&gt;Your RegEx will never match (even if &lt;CODE&gt;url&lt;/CODE&gt; has &lt;CODE&gt;http://&lt;/CODE&gt; removed).  To make it match, use something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=sourceindex | transaction maxspan=30s startswith=url="/abc.html" endswith=eval(match(url,"\w+\.\w+\?")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 09 Jul 2015 19:56:29 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2015-07-09T19:56:29Z</dc:date>
    <item>
      <title>How to write a transaction search where startswith starts with event A, while endswith must match a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-transaction-search-where-startswith-starts-with/m-p/115106#M30446</link>
      <description>&lt;P&gt;I need to find a sequence of activity that always start with:&lt;BR /&gt;
&lt;A href="http://abc.com/abc.html"&gt;http://abc.com/abc.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://abc.com/end.xvz"&gt;http://abc.com/end.xvz&lt;/A&gt;?....&lt;/P&gt;

&lt;P&gt;so I tried to uses this search query:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=sourceindex | transaction maxspan=30s startswith=url="/abc.html" endswith=eval(match(url,"^\/\w+\.\w+")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;However, the return result is 0 event.&lt;/P&gt;

&lt;P&gt;Is there anyway that I can refine it?&lt;/P&gt;

&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 18:08:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-transaction-search-where-startswith-starts-with/m-p/115106#M30446</guid>
      <dc:creator>phudinhha</dc:creator>
      <dc:date>2015-07-09T18:08:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a transaction search where startswith starts with event A, while endswith must match a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-transaction-search-where-startswith-starts-with/m-p/115107#M30447</link>
      <description>&lt;P&gt;Dear woodcock,&lt;BR /&gt;
The return result is 0 event. However, when i omit the "endswith" part, the expected "end.xvz?...." also shows in the event tab as a part of "/abc.html" event. What does it mean?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 19:22:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-transaction-search-where-startswith-starts-with/m-p/115107#M30447</guid>
      <dc:creator>phudinhha</dc:creator>
      <dc:date>2015-07-09T19:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a transaction search where startswith starts with event A, while endswith must match a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-transaction-search-where-startswith-starts-with/m-p/115108#M30448</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=sourceindex | rex field=url "(?&amp;lt;url_front&amp;gt;[^\?]*)\/(?&amp;lt;url_back&amp;gt;.*)" | transaction url_front maxspan=30s endswith=eval(match(url_back,"end.xyz"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Actually, you may not even need the &lt;CODE&gt;endswith&lt;/CODE&gt; part (which I know is wrong because I don't know what you are trying to match exactly).&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 19:33:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-transaction-search-where-startswith-starts-with/m-p/115108#M30448</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-09T19:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a transaction search where startswith starts with event A, while endswith must match a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-transaction-search-where-startswith-starts-with/m-p/115109#M30449</link>
      <description>&lt;P&gt;I recognized the pattern in network activities like this.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://123.com/abc.html"&gt;http://123.com/abc.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://123.com/end.xvz"&gt;http://123.com/end.xvz&lt;/A&gt;?....&lt;/P&gt;

&lt;P&gt;AND&lt;/P&gt;

&lt;P&gt;&lt;A href="http://456.com/abc.html"&gt;http://456.com/abc.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://456.com/quiz.one"&gt;http://456.com/quiz.one&lt;/A&gt;?...&lt;/P&gt;

&lt;P&gt;So I want to use transaction to look for a sequence of activity that starts with "abc.html" and ends with ""^/w+.w+".&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jul 2015 19:52:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-transaction-search-where-startswith-starts-with/m-p/115109#M30449</guid>
      <dc:creator>phudinhha</dc:creator>
      <dc:date>2015-07-09T19:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a transaction search where startswith starts with event A, while endswith must match a regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-transaction-search-where-startswith-starts-with/m-p/115110#M30450</link>
      <description>&lt;P&gt;Your RegEx will never match (even if &lt;CODE&gt;url&lt;/CODE&gt; has &lt;CODE&gt;http://&lt;/CODE&gt; removed).  To make it match, use something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=sourceindex | transaction maxspan=30s startswith=url="/abc.html" endswith=eval(match(url,"\w+\.\w+\?")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Jul 2015 19:56:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-transaction-search-where-startswith-starts-with/m-p/115110#M30450</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-09T19:56:29Z</dc:date>
    </item>
  </channel>
</rss>

