<?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: rex expression in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116263#M30869</link>
    <description>&lt;P&gt;Does this work?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "doc_name:\"(?&amp;lt;mydocname&amp;gt;[^+]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You may also need to specify the field for the rex if it not coming from _raw like so.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=params "doc_name:\"(?&amp;lt;mydocname&amp;gt;[^+]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 15 Jan 2014 22:19:03 GMT</pubDate>
    <dc:creator>bandit</dc:creator>
    <dc:date>2014-01-15T22:19:03Z</dc:date>
    <item>
      <title>rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116262#M30868</link>
      <description>&lt;P&gt;one of my field contains one big string as shown below&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;params={fl=doc_objectid,score&amp;amp;sort=doc_dateeffective+asc,doc_number+asc&amp;amp;start=0&amp;amp;q=((doc_name:"pd\-dir\-0017\+\(005220\)"^72)+AND+(doc_version:"2.0"))+AND++doc_docbase:QDOC_PD_DOCS_MIG^0.00001+AND+doc_objecttype:document^0.00001&amp;amp;rows=500}&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Using rex expression i wanted to extract the value of doc_name which is embedded inside the params field - the value is equal to whatever comes in till we hit )&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;sourcetype = abc.log | fields params | rex "doc_name:&amp;lt;?mydocname&amp;gt;[]+\&lt;/CODE&gt; - i tried this - its not working..wanted to extract it in mydocname and sort by that field&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jan 2014 21:43:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116262#M30868</guid>
      <dc:creator>ajaysamantbms</dc:creator>
      <dc:date>2014-01-15T21:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116263#M30869</link>
      <description>&lt;P&gt;Does this work?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "doc_name:\"(?&amp;lt;mydocname&amp;gt;[^+]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You may also need to specify the field for the rex if it not coming from _raw like so.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=params "doc_name:\"(?&amp;lt;mydocname&amp;gt;[^+]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Jan 2014 22:19:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116263#M30869</guid>
      <dc:creator>bandit</dc:creator>
      <dc:date>2014-01-15T22:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116264#M30870</link>
      <description>&lt;P&gt;thanks it works for me..i could tweak it to change the field delimiter...thanks&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2014 15:17:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116264#M30870</guid>
      <dc:creator>ajaysamantbms</dc:creator>
      <dc:date>2014-01-16T15:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116265#M30871</link>
      <description>&lt;P&gt;please check it and it works on my machine&lt;/P&gt;

&lt;P&gt;| rex field=params   ".&lt;EM&gt;((\w+:\"(?.&lt;/EM&gt;)\"^.*"&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 04:56:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116265#M30871</guid>
      <dc:creator>arihant16cse</dc:creator>
      <dc:date>2019-02-07T04:56:07Z</dc:date>
    </item>
    <item>
      <title>Re: rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116266#M30872</link>
      <description>&lt;P&gt;| rex field=_raw ".&lt;EM&gt;((\w+:\"(?.&lt;/EM&gt;)\"^.*"   &lt;/P&gt;

&lt;P&gt;please try it......it is not hard coded......&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 05:07:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116266#M30872</guid>
      <dc:creator>arihant16cse</dc:creator>
      <dc:date>2019-02-07T05:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116267#M30873</link>
      <description>&lt;P&gt;| rex field=params ".((\w+:\"(?.)\"^.*"&lt;/P&gt;</description>
      <pubDate>Thu, 07 Feb 2019 10:35:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-expression/m-p/116267#M30873</guid>
      <dc:creator>1206chandra</dc:creator>
      <dc:date>2019-02-07T10:35:24Z</dc:date>
    </item>
  </channel>
</rss>

