<?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 do you write a Regular expression in props.conf for only one field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405364#M117173</link>
    <description>&lt;P&gt;HI,&lt;/P&gt;

&lt;P&gt;if you want to add a search time field extraction within props.conf, just use &lt;CODE&gt;EXTRACT&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your-sourcetype]    
EXTRACT-&amp;lt;class&amp;gt; = [&amp;lt;regex&amp;gt;|&amp;lt;regex&amp;gt; in &amp;lt;src_field&amp;gt;]
    * Used to create extracted fields (search-time field extractions) that do
      not reference transforms.conf stanzas.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;for reference see : &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.2.1/Admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/7.2.1/Admin/Propsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please keep in mind that this will require a refresh/debug= &lt;CODE&gt;http[s]://[splunkweb hostname]:[splunkweb port]/debug/refresh&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Nov 2018 07:40:12 GMT</pubDate>
    <dc:creator>dkeck</dc:creator>
    <dc:date>2018-11-28T07:40:12Z</dc:date>
    <item>
      <title>How do you write a Regular expression in props.conf for only one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405363#M117172</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;

&lt;P&gt;How do I write a regular expression in props.conf for only one field ?&lt;/P&gt;

&lt;P&gt;like rex field=ab "regex"&lt;/P&gt;

&lt;P&gt;thanks&lt;BR /&gt;
Rakesh&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 07:07:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405363#M117172</guid>
      <dc:creator>rakeshksingh</dc:creator>
      <dc:date>2018-11-28T07:07:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a Regular expression in props.conf for only one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405364#M117173</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;

&lt;P&gt;if you want to add a search time field extraction within props.conf, just use &lt;CODE&gt;EXTRACT&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your-sourcetype]    
EXTRACT-&amp;lt;class&amp;gt; = [&amp;lt;regex&amp;gt;|&amp;lt;regex&amp;gt; in &amp;lt;src_field&amp;gt;]
    * Used to create extracted fields (search-time field extractions) that do
      not reference transforms.conf stanzas.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;for reference see : &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.2.1/Admin/Propsconf"&gt;http://docs.splunk.com/Documentation/Splunk/7.2.1/Admin/Propsconf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please keep in mind that this will require a refresh/debug= &lt;CODE&gt;http[s]://[splunkweb hostname]:[splunkweb port]/debug/refresh&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 07:40:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405364#M117173</guid>
      <dc:creator>dkeck</dc:creator>
      <dc:date>2018-11-28T07:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a Regular expression in props.conf for only one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405365#M117174</link>
      <description>&lt;P&gt;Hi &lt;/P&gt;

&lt;P&gt;tried but no luck.&lt;/P&gt;

&lt;P&gt;[your-sourcetype]&lt;BR /&gt;&lt;BR /&gt;
 EXTRACT-ab1 = [(?{.) in ab]&lt;/P&gt;

&lt;P&gt;Could you take a look and guide me which part i am missing ?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 08:46:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405365#M117174</guid>
      <dc:creator>rakeshksingh</dc:creator>
      <dc:date>2018-11-28T08:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a Regular expression in props.conf for only one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405366#M117175</link>
      <description>&lt;P&gt;tried below also but no luck.&lt;/P&gt;

&lt;P&gt;EXTRACT-ab1 = (?{.) in ab&lt;/P&gt;

&lt;P&gt;ab  as field name&lt;/P&gt;

&lt;P&gt;and tried with props and conf but no luck&lt;/P&gt;

&lt;P&gt;[mysourcetype]&lt;/P&gt;

&lt;P&gt;REPORT-myextract = myextract&lt;/P&gt;

&lt;P&gt;Then in transforms.conf:&lt;/P&gt;

&lt;P&gt;[myextract]&lt;/P&gt;

&lt;P&gt;SOURCE_KEY = ab&lt;/P&gt;

&lt;P&gt;REGEX = regex&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 10:15:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405366#M117175</guid>
      <dc:creator>rakeshksingh</dc:creator>
      <dc:date>2018-11-28T10:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a Regular expression in props.conf for only one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405367#M117176</link>
      <description>&lt;P&gt;Do you have an example of the data? &lt;/P&gt;

&lt;P&gt;Did you test your regex? for example here: &lt;A href="https://regex101.com/"&gt;https://regex101.com/&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Syntax for EXTRACT should look like this : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;EXTRACT-threadid = (?&amp;lt;threadid&amp;gt;[0-9A-Fa-f]+)\s+
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Nov 2018 10:24:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405367#M117176</guid>
      <dc:creator>dkeck</dc:creator>
      <dc:date>2018-11-28T10:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a Regular expression in props.conf for only one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405368#M117177</link>
      <description>&lt;P&gt;Those square brackets shouldn't be there.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 10:28:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405368#M117177</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-11-28T10:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a Regular expression in props.conf for only one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405369#M117178</link>
      <description>&lt;P&gt;Your EXTRACT doesn't look like a valid regex (but perhaps some characters went missing by posting it here without using the post as code option (use the 101010 button in the message editor toolbar, or enclose the code in `)&lt;/P&gt;

&lt;P&gt;Your transforms is impossible to comment on without posting the actual regex. Does that include named capturing groups (e.g. &lt;CODE&gt;(?&amp;lt;fieldname&amp;gt;regex)&lt;/CODE&gt;? Otherwise you also need a FORMAT setting to specify what field(s) the capture group(s) should be mapped to.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 10:29:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405369#M117178</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-11-28T10:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: How do you write a Regular expression in props.conf for only one field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405370#M117179</link>
      <description>&lt;P&gt;Thanks for response,&lt;/P&gt;

&lt;P&gt;in ab field, data is on json format&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 17:59:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-write-a-Regular-expression-in-props-conf-for-only-one/m-p/405370#M117179</guid>
      <dc:creator>rakeshksingh</dc:creator>
      <dc:date>2018-11-28T17:59:21Z</dc:date>
    </item>
  </channel>
</rss>

