<?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 How to add regex to transforms.conf in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-add-regex-to-transforms-conf/m-p/77439#M4902</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have some data like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;D HE122013032521002200GTB27000780000100108 00000000030008110000081100000 640001
D HE122013032521002200GTB27000780000100108 00000000030008110000081100000 640001
D HE122013032521002200GTB27000780000100108 00000000030008110000081100000 640001
D HE122013032521002200GTB27000780000100108 00000000030008110000081100000 640001
D HE122013032521002200GTB27000780000100108 00000000030008110000081100000 640001
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have to extract the fields from these. but the problem is IFE cannot extract as i want to.&lt;BR /&gt;
cuz the fields are like this. have to extract them one by one. I don't know that much REGEX.&lt;/P&gt;

&lt;P&gt;D&lt;BR /&gt;
HE12&lt;BR /&gt;
20130325&lt;BR /&gt;
21002200&lt;BR /&gt;
GTB27000&lt;BR /&gt;
etc&lt;BR /&gt;
etc&lt;/P&gt;

&lt;P&gt;Please help.&lt;BR /&gt;
I think i have to manually edit tranforms.conf and props.conf to do the translations right?&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;

&lt;P&gt;Chamil&lt;/P&gt;</description>
    <pubDate>Thu, 28 Mar 2013 08:09:39 GMT</pubDate>
    <dc:creator>chamil3001</dc:creator>
    <dc:date>2013-03-28T08:09:39Z</dc:date>
    <item>
      <title>How to add regex to transforms.conf</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-add-regex-to-transforms-conf/m-p/77439#M4902</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I have some data like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;D HE122013032521002200GTB27000780000100108 00000000030008110000081100000 640001
D HE122013032521002200GTB27000780000100108 00000000030008110000081100000 640001
D HE122013032521002200GTB27000780000100108 00000000030008110000081100000 640001
D HE122013032521002200GTB27000780000100108 00000000030008110000081100000 640001
D HE122013032521002200GTB27000780000100108 00000000030008110000081100000 640001
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have to extract the fields from these. but the problem is IFE cannot extract as i want to.&lt;BR /&gt;
cuz the fields are like this. have to extract them one by one. I don't know that much REGEX.&lt;/P&gt;

&lt;P&gt;D&lt;BR /&gt;
HE12&lt;BR /&gt;
20130325&lt;BR /&gt;
21002200&lt;BR /&gt;
GTB27000&lt;BR /&gt;
etc&lt;BR /&gt;
etc&lt;/P&gt;

&lt;P&gt;Please help.&lt;BR /&gt;
I think i have to manually edit tranforms.conf and props.conf to do the translations right?&lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;

&lt;P&gt;Chamil&lt;/P&gt;</description>
      <pubDate>Thu, 28 Mar 2013 08:09:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-add-regex-to-transforms-conf/m-p/77439#M4902</guid>
      <dc:creator>chamil3001</dc:creator>
      <dc:date>2013-03-28T08:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to add regex to transforms.conf</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-add-regex-to-transforms-conf/m-p/77440#M4903</link>
      <description>&lt;P&gt;If your log is really like that, with fixed-length fields concatenated together (mostly) without whitespace between them, you can do a props.conf only extraction, like so;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourctype]
EXTRACT-blah = (?&amp;lt;field_name1&amp;gt;\w{1})\s(?&amp;lt;field_name2&amp;gt;\w{4})(?&amp;lt;field_name3&amp;gt;\d{6})(?&amp;lt;field_name4&amp;gt;\d{6})(?&amp;lt;field_name5&amp;gt;\w{8})
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;etc etc&lt;/P&gt;

&lt;P&gt;field_name1 (rename it as you please) would contain the first character &lt;CODE&gt;\w{1}&lt;/CODE&gt;&lt;BR /&gt;
then the space/tab is skipped &lt;CODE&gt;\s&lt;/CODE&gt;&lt;BR /&gt;
field_name2 would contain the next 4 characters &lt;CODE&gt;\w{4}&lt;/CODE&gt;&lt;BR /&gt;
field_name3 would contain the next 6 digits &lt;CODE&gt;\d{6}&lt;/CODE&gt;&lt;BR /&gt;
etc etc &lt;/P&gt;

&lt;P&gt;Hope this helps, &lt;/P&gt;

&lt;P&gt;Kristian&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:38:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/How-to-add-regex-to-transforms-conf/m-p/77440#M4903</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2020-09-28T13:38:02Z</dc:date>
    </item>
  </channel>
</rss>

