<?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>question Re: How do I write the Regular Expression from the text? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-do-I-write-the-Regular-Expression-from-the-text/m-p/291628#M215627</link>
    <description>&lt;P&gt;I know some other people with big time Regex Skills can map it differently but the method I use it to get single values using strategic wildcard like searches in ReplaceText like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;timestamp : &amp;nbsp;([0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):([0-5][0-9]):([0-9]{2}).([0-9]{6})) .*&lt;/P&gt;&lt;P&gt;source_ip :&amp;nbsp;.* (.*) -&amp;gt; .*&lt;/P&gt;&lt;P&gt;dest_ip : .* -&amp;gt; (.*) &amp;lt;.*&lt;/P&gt;&lt;P&gt;Mac :&amp;nbsp;^.*] TS\|[0-9]{10}\|([a-fA-F0-9:]{17}|[a-fA-F0-9]{12})\|.*$&lt;/P&gt;&lt;P&gt;dbm :&amp;nbsp;^.*\|(.*)$&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also test using a regex tester like this one: &amp;nbsp;&lt;A href="https://regex101.com/" target="_blank"&gt;REGEX&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Mar 2020 13:05:52 GMT</pubDate>
    <dc:creator>stevenmatison</dc:creator>
    <dc:date>2020-03-12T13:05:52Z</dc:date>
    <item>
      <title>How do I write the Regular Expression from the text?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-I-write-the-Regular-Expression-from-the-text/m-p/291603#M215606</link>
      <description>&lt;P&gt;Below is the text and I need to write the regular expression so that I can extract attribute from this field.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7" color="#0000FF"&gt;2017-04-27 09:07:20.517342 10.69.1.138 -&amp;gt; 10.69.1.100 &amp;lt;4&amp;gt;Apr 27 03:37:13 kernel: [ 78.294310] TS|4294745280|00:14:5a:03:29:33|RSSI_BCN|34&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;timestamp:2017-04-27 09:07:20.517342&amp;nbsp;&lt;/P&gt;
&lt;P&gt;source_ip:10.69.1.138&lt;/P&gt;
&lt;P&gt;dest_ip:10.69.1.100&lt;/P&gt;
&lt;P&gt;mac:00:14:5a:03:29:33&lt;/P&gt;
&lt;P&gt;obm:RSSI_BCN&lt;/P&gt;
&lt;P&gt;dbm:34&lt;/P&gt;
&lt;P&gt;How can I write the regex sothat I can collect each of the field from the text?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 04:35:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-I-write-the-Regular-Expression-from-the-text/m-p/291603#M215606</guid>
      <dc:creator>DarkStar</dc:creator>
      <dc:date>2020-03-12T04:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write the Regular Expression from the text?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-I-write-the-Regular-Expression-from-the-text/m-p/291628#M215627</link>
      <description>&lt;P&gt;I know some other people with big time Regex Skills can map it differently but the method I use it to get single values using strategic wildcard like searches in ReplaceText like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;timestamp : &amp;nbsp;([0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1]) (2[0-3]|[01][0-9]):([0-5][0-9]):([0-9]{2}).([0-9]{6})) .*&lt;/P&gt;&lt;P&gt;source_ip :&amp;nbsp;.* (.*) -&amp;gt; .*&lt;/P&gt;&lt;P&gt;dest_ip : .* -&amp;gt; (.*) &amp;lt;.*&lt;/P&gt;&lt;P&gt;Mac :&amp;nbsp;^.*] TS\|[0-9]{10}\|([a-fA-F0-9:]{17}|[a-fA-F0-9]{12})\|.*$&lt;/P&gt;&lt;P&gt;dbm :&amp;nbsp;^.*\|(.*)$&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also test using a regex tester like this one: &amp;nbsp;&lt;A href="https://regex101.com/" target="_blank"&gt;REGEX&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 13:05:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-I-write-the-Regular-Expression-from-the-text/m-p/291628#M215627</guid>
      <dc:creator>stevenmatison</dc:creator>
      <dc:date>2020-03-12T13:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write the Regular Expression from the text?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-do-I-write-the-Regular-Expression-from-the-text/m-p/291655#M215645</link>
      <description>&lt;P&gt;Hello Steve,&lt;BR /&gt;Thanks for your answer. Don't know why&amp;nbsp;your provided answer is not working in my case.&amp;nbsp;But I solved it in another way which I am sharing here for others&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;timestamp :&amp;nbsp;([0-9]{4})-([0-1][0-9])-([0-3][0-9])\s([0-1][0-9]|[2][0-3]):([0-5][0-9]):([0-5][0-9]).(\d*)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000FF"&gt;source_ip :&amp;nbsp; (?:[0-9]{1,3}\.){3}[0-9]{1,3}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2" color="#0000FF"&gt;Mac : ([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT size="2" color="#0000FF"&gt;dbm : (\d*)\z&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2020 16:56:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-do-I-write-the-Regular-Expression-from-the-text/m-p/291655#M215645</guid>
      <dc:creator>DarkStar</dc:creator>
      <dc:date>2020-03-12T16:56:36Z</dc:date>
    </item>
  </channel>
</rss>

