<?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 line breaking - regex and capturing group in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/line-breaking-regex-and-capturing-group/m-p/46741#M8824</link>
    <description>&lt;P&gt;Hello,
Need some help on regex here, am sure i maybe making mistake here but..&lt;/P&gt;

&lt;P&gt;trying to break these into seperate events by using LINE_BREAKER under props.conf&lt;/P&gt;

&lt;P&gt;sample output of my event :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"datetime=26Aug2001","20:26:02","action=drop","fw_name=NFLcp.NFL.gov","dir=inbound","src=139.67.8.235","dst=139.203.160.214","bytes=48","rule=29","proto=tcp/http"
"datetime=26Aug2001","20:26:03","action=drop","fw_name=NFLcp.NFL.gov","dir=inbound","src=61.138.33.102","dst=139.203.13.45","bytes=48","rule=29","proto=tcp/http"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;my props.conf LINE_BREAKER looks like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LINE_BREAKER = (tcp/http")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;what's happening here is since this is capturing group, it doesnt get displayed in the actual event, looks like this : (without the tcp/http)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"datetime=26Aug2001","20:26:03","action=drop","fw_name=NFLcp.NFL.gov","dir=inbound","src=61.138.33.102","dst=139.203.13.45","bytes=48","rule=29","proto=
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i tried using look-ahead like these but its still not working :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LINE_BREAKER = =(?=(tcp/http"))

LINE_BREAKER = =((?=tcp/http"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;any help on this ?  &lt;/P&gt;

&lt;P&gt;thanks
pmr&lt;/P&gt;</description>
    <pubDate>Fri, 18 Feb 2011 02:51:10 GMT</pubDate>
    <dc:creator>pmr</dc:creator>
    <dc:date>2011-02-18T02:51:10Z</dc:date>
    <item>
      <title>line breaking - regex and capturing group</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/line-breaking-regex-and-capturing-group/m-p/46741#M8824</link>
      <description>&lt;P&gt;Hello,
Need some help on regex here, am sure i maybe making mistake here but..&lt;/P&gt;

&lt;P&gt;trying to break these into seperate events by using LINE_BREAKER under props.conf&lt;/P&gt;

&lt;P&gt;sample output of my event :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"datetime=26Aug2001","20:26:02","action=drop","fw_name=NFLcp.NFL.gov","dir=inbound","src=139.67.8.235","dst=139.203.160.214","bytes=48","rule=29","proto=tcp/http"
"datetime=26Aug2001","20:26:03","action=drop","fw_name=NFLcp.NFL.gov","dir=inbound","src=61.138.33.102","dst=139.203.13.45","bytes=48","rule=29","proto=tcp/http"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;my props.conf LINE_BREAKER looks like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LINE_BREAKER = (tcp/http")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;what's happening here is since this is capturing group, it doesnt get displayed in the actual event, looks like this : (without the tcp/http)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"datetime=26Aug2001","20:26:03","action=drop","fw_name=NFLcp.NFL.gov","dir=inbound","src=61.138.33.102","dst=139.203.13.45","bytes=48","rule=29","proto=
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i tried using look-ahead like these but its still not working :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LINE_BREAKER = =(?=(tcp/http"))

LINE_BREAKER = =((?=tcp/http"))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;any help on this ?  &lt;/P&gt;

&lt;P&gt;thanks
pmr&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2011 02:51:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/line-breaking-regex-and-capturing-group/m-p/46741#M8824</guid>
      <dc:creator>pmr</dc:creator>
      <dc:date>2011-02-18T02:51:10Z</dc:date>
    </item>
    <item>
      <title>Re: line breaking - regex and capturing group</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/line-breaking-regex-and-capturing-group/m-p/46742#M8825</link>
      <description>&lt;P&gt;You probably want something more like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;LINE_BREAKER = ([\r\n]+)(?=\"datetime\=)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Feb 2011 05:22:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/line-breaking-regex-and-capturing-group/m-p/46742#M8825</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-02-18T05:22:54Z</dc:date>
    </item>
  </channel>
</rss>

