<?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: I have a problem in creating regex for below expression? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-problem-in-creating-regex-for-below-expression/m-p/377113#M110654</link>
    <description>&lt;P&gt;If you want to extract the field inline in the search, the regular expression from first option (EXTRACT-fields) in your &lt;CODE&gt;rex&lt;/CODE&gt; command.&lt;/P&gt;</description>
    <pubDate>Tue, 08 May 2018 16:47:48 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2018-05-08T16:47:48Z</dc:date>
    <item>
      <title>I have a problem in creating regex for below expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-problem-in-creating-regex-for-below-expression/m-p/377110#M110651</link>
      <description>&lt;P&gt;expression:&lt;BR /&gt;
2018-02-2008:13:44|ABC1034|Sumit Martin|0|147707|Amit|SURESH||19490616|M|2030 SQ 16 PERRA|ABC E-212|INDIA|FL|33125|7863174200|Tiger|Transportation|Created|&lt;/P&gt;

&lt;P&gt;I have created regex for extracting threefields but not able  figure out how to write for other fields.You can assign any name for fields.&lt;BR /&gt;
Below is my regex:&lt;BR /&gt;
(?timestamp(\d{4})-(\d{2})-(\d{4}):(\d{2}):(\d{2}))|(?id([A-Z]{3}\d{4}))|(?contact(\d{10}))&lt;/P&gt;

&lt;P&gt;After the ? ,there is &amp;lt; timestamp  and after field name &amp;gt;. Splunk editor is  not allowing me to add that .eg:-  &amp;lt; timestamp    "&amp;gt;"&lt;BR /&gt;
Don't keep double quotes.&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 16:30:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-problem-in-creating-regex-for-below-expression/m-p/377110#M110651</guid>
      <dc:creator>pal_sumit1</dc:creator>
      <dc:date>2018-05-08T16:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: I have a problem in creating regex for below expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-problem-in-creating-regex-for-below-expression/m-p/377111#M110652</link>
      <description>&lt;P&gt;Try this (they pipe separated values so regex doing the same, dummy field names are used here, update per your data and it's sequencing in the data)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;###props.conf on Search Head
[yourSourceType]
EXTRACT-fields = ^(?&amp;lt;Timestamp&amp;gt;[^\|]+)\|(?&amp;lt;field1&amp;gt;[^\|]+)\|(?&amp;lt;field2&amp;gt;[^\|]+)\|(?&amp;lt;field3&amp;gt;[^\|]+)\|(?&amp;lt;field4&amp;gt;[^\|]+)\|(?&amp;lt;field5&amp;gt;[^\|]+)\|(?&amp;lt;field5&amp;gt;[^\|]+)\|(?&amp;lt;field1&amp;gt;[^\|]+)\|(?&amp;lt;field1&amp;gt;[^\|]+)\|(?&amp;lt;Timestamp&amp;gt;[^\|]+)\|(?&amp;lt;field1&amp;gt;[^\|]+)\|(?&amp;lt;field1&amp;gt;[^\|]+)\|(?&amp;lt;field1&amp;gt;[^\|]+)\|(?&amp;lt;field1&amp;gt;[^\|]+)\|(?&amp;lt;field1&amp;gt;[^\|]+)\|(?&amp;lt;field1&amp;gt;[^\|]+)\|(?&amp;lt;field1&amp;gt;[^\|]+)\|(?&amp;lt;field1&amp;gt;[^\|]+)\|
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR (props.conf and transforms.conf on Search Head)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;###props.conf on Search Head
[yourSourceType]
REPORT-fields = psv_fields_for_yourSourceType

###transforms.conf on Search head
[psv_fields_for_yourSourceType]
DELIMS = "|"
FIELDS = "timestamp", "field1", "field2",...comma separated list of all fields..
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 08 May 2018 16:47:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-problem-in-creating-regex-for-below-expression/m-p/377111#M110652</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-08T16:47:04Z</dc:date>
    </item>
    <item>
      <title>Re: I have a problem in creating regex for below expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-problem-in-creating-regex-for-below-expression/m-p/377112#M110653</link>
      <description>&lt;P&gt;Hello, could you provide a sample event? &lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 16:47:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-problem-in-creating-regex-for-below-expression/m-p/377112#M110653</guid>
      <dc:creator>jodyfsu</dc:creator>
      <dc:date>2018-05-08T16:47:48Z</dc:date>
    </item>
    <item>
      <title>Re: I have a problem in creating regex for below expression?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/I-have-a-problem-in-creating-regex-for-below-expression/m-p/377113#M110654</link>
      <description>&lt;P&gt;If you want to extract the field inline in the search, the regular expression from first option (EXTRACT-fields) in your &lt;CODE&gt;rex&lt;/CODE&gt; command.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 16:47:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/I-have-a-problem-in-creating-regex-for-below-expression/m-p/377113#M110654</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2018-05-08T16:47:48Z</dc:date>
    </item>
  </channel>
</rss>

