<?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 Regex to replace all characters after &amp;quot; ;&amp;quot; in a string in a flowfile - NiFi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Regex-to-replace-all-characters-after-quot-quot-in-a-string/m-p/234471#M196291</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Am trying to replace all characters after ";" including ; in the flowfile record.&lt;/P&gt;&lt;P&gt;I was using &lt;STRONG&gt;replacetext &lt;/STRONG&gt;processor with &lt;STRONG&gt;;.*$&lt;/STRONG&gt; as the &lt;STRONG&gt;search value&lt;/STRONG&gt; and &lt;STRONG&gt;set empty value&lt;/STRONG&gt; for &lt;STRONG&gt;Replacement value&lt;/STRONG&gt; properties to achieve this. However it is not working out.&lt;/P&gt;&lt;P&gt;Any inputs in this regard would be really helpful.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Input&lt;/P&gt;&lt;P&gt;Replace;text;processor&lt;/P&gt;&lt;P&gt;Expected Output:&lt;/P&gt;&lt;P&gt;Replace&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bala.&lt;/P&gt;</description>
    <pubDate>Tue, 19 Feb 2019 15:44:28 GMT</pubDate>
    <dc:creator>bsivalingam83</dc:creator>
    <dc:date>2019-02-19T15:44:28Z</dc:date>
    <item>
      <title>Regex to replace all characters after " ;" in a string in a flowfile - NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Regex-to-replace-all-characters-after-quot-quot-in-a-string/m-p/234471#M196291</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Am trying to replace all characters after ";" including ; in the flowfile record.&lt;/P&gt;&lt;P&gt;I was using &lt;STRONG&gt;replacetext &lt;/STRONG&gt;processor with &lt;STRONG&gt;;.*$&lt;/STRONG&gt; as the &lt;STRONG&gt;search value&lt;/STRONG&gt; and &lt;STRONG&gt;set empty value&lt;/STRONG&gt; for &lt;STRONG&gt;Replacement value&lt;/STRONG&gt; properties to achieve this. However it is not working out.&lt;/P&gt;&lt;P&gt;Any inputs in this regard would be really helpful.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Input&lt;/P&gt;&lt;P&gt;Replace;text;processor&lt;/P&gt;&lt;P&gt;Expected Output:&lt;/P&gt;&lt;P&gt;Replace&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Bala.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Feb 2019 15:44:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Regex-to-replace-all-characters-after-quot-quot-in-a-string/m-p/234471#M196291</guid>
      <dc:creator>bsivalingam83</dc:creator>
      <dc:date>2019-02-19T15:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to replace all characters after " ;" in a string in a flowfile - NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Regex-to-replace-all-characters-after-quot-quot-in-a-string/m-p/234472#M196292</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/44609/bsivalingam83.html" nodeid="44609" target="_blank"&gt;@Bala S&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I would recommend using capture groups in your regex. Here is an example that will work for your example:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="106450-screen-shot-2019-02-19-at-91026-am.png" style="width: 486px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14653i0AF2B808BA85FA52/image-size/medium?v=v2&amp;amp;px=400" role="button" title="106450-screen-shot-2019-02-19-at-91026-am.png" alt="106450-screen-shot-2019-02-19-at-91026-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I then replace with just the value from capture group 1&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Here is another example that is more generic (can have many ";&amp;lt;somevalue&amp;gt;" after first one:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="106471-screen-shot-2019-02-19-at-91344-am.png" style="width: 475px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/14654i0AC628696B7836F2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="106471-screen-shot-2019-02-19-at-91344-am.png" alt="106471-screen-shot-2019-02-19-at-91344-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here again I use capture group 1 as my replacement value.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;If you found this answer addressed your question, please take a moment to login in and click the "ACCEPT" link&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 00:03:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Regex-to-replace-all-characters-after-quot-quot-in-a-string/m-p/234472#M196292</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2019-08-18T00:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to replace all characters after " ;" in a string in a flowfile - NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Regex-to-replace-all-characters-after-quot-quot-in-a-string/m-p/234473#M196293</link>
      <description>&lt;P&gt;Thanks @Matt Clarke. I went with the option 2 and it worked. Thanks again for the quick reply.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 02:05:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Regex-to-replace-all-characters-after-quot-quot-in-a-string/m-p/234473#M196293</guid>
      <dc:creator>bsivalingam83</dc:creator>
      <dc:date>2019-02-20T02:05:27Z</dc:date>
    </item>
  </channel>
</rss>

