<?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 Issue in Regular expression in nifi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Issue-in-Regular-expression-in-nifi/m-p/368029#M240039</link>
    <description>&lt;P&gt;I am consuming a messages from IBM MQ using processor (ConsumeJMS), then once you explore as a "List queue" you will see the following type and format:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ahmedalsaidi_0-1681033213596.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37220iA4D66A401CF0651C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ahmedalsaidi_0-1681033213596.png" alt="ahmedalsaidi_0-1681033213596.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hence, I added a following processor (&lt;SPAN&gt;ExtractText 1.16.1&lt;/SPAN&gt;&lt;SPAN&gt;) in order to search for some texts using regular expression as following:&amp;nbsp;(ACT.A.EMS..ST...AIR|ACT.X.EMS..ST...AIR)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ahmedalsaidi_1-1681033395890.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37221iAAF28EDF759B2C00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ahmedalsaidi_1-1681033395890.png" alt="ahmedalsaidi_1-1681033395890.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Finally, Sometimes the results of regular expression are valid and sometimes it satisfies a half of my condition because:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1) if it does not match anything hence it match only the part of my condition. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2) or if the half of my condition is valid; hence it will match!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there something wrong I am doing in my regular expression or something else? or I need to change type, format, or content type (&lt;SPAN&gt;application/octet-stream&lt;/SPAN&gt;) to text so that I can search correctly instead of viewed as a hex?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I hope my explanation was fine and clear for everyone.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 09 Apr 2023 10:02:15 GMT</pubDate>
    <dc:creator>ahmedalsaidi</dc:creator>
    <dc:date>2023-04-09T10:02:15Z</dc:date>
    <item>
      <title>Issue in Regular expression in nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Issue-in-Regular-expression-in-nifi/m-p/368029#M240039</link>
      <description>&lt;P&gt;I am consuming a messages from IBM MQ using processor (ConsumeJMS), then once you explore as a "List queue" you will see the following type and format:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ahmedalsaidi_0-1681033213596.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37220iA4D66A401CF0651C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ahmedalsaidi_0-1681033213596.png" alt="ahmedalsaidi_0-1681033213596.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hence, I added a following processor (&lt;SPAN&gt;ExtractText 1.16.1&lt;/SPAN&gt;&lt;SPAN&gt;) in order to search for some texts using regular expression as following:&amp;nbsp;(ACT.A.EMS..ST...AIR|ACT.X.EMS..ST...AIR)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ahmedalsaidi_1-1681033395890.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37221iAAF28EDF759B2C00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ahmedalsaidi_1-1681033395890.png" alt="ahmedalsaidi_1-1681033395890.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Finally, Sometimes the results of regular expression are valid and sometimes it satisfies a half of my condition because:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1) if it does not match anything hence it match only the part of my condition. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2) or if the half of my condition is valid; hence it will match!&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there something wrong I am doing in my regular expression or something else? or I need to change type, format, or content type (&lt;SPAN&gt;application/octet-stream&lt;/SPAN&gt;) to text so that I can search correctly instead of viewed as a hex?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I hope my explanation was fine and clear for everyone.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 09 Apr 2023 10:02:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Issue-in-Regular-expression-in-nifi/m-p/368029#M240039</guid>
      <dc:creator>ahmedalsaidi</dc:creator>
      <dc:date>2023-04-09T10:02:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue in Regular expression in nifi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Issue-in-Regular-expression-in-nifi/m-p/368159#M240080</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/73830"&gt;@ahmedalsaidi&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;You do not need to change the content type since you specify the character set to use in the ExtractText processor which defaults to "UTF-8".&amp;nbsp; If you change the content type or the filename, the built in content viewer in NiFi would be able to display text instead of hex.&amp;nbsp; For example: adding ".txt" to end of filename.&lt;BR /&gt;&lt;BR /&gt;When it comes to your matching issue, it would be difficult for me to say what is happening here without a working and non-working sample to look at.&amp;nbsp; In Java regular expressions the "." means any character; however, looking at you hex output screenshot it looks like you really want a literal "." to match.&amp;nbsp; If you want your java regular expression to match the literal ".", then add a "\" (backslash) before each ".".&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2023 20:33:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Issue-in-Regular-expression-in-nifi/m-p/368159#M240080</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-04-10T20:33:44Z</dc:date>
    </item>
  </channel>
</rss>

