<?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 Re: Another Regex Replace question in Alteryx Designer Desktop Discussions</title>
    <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Another-Regex-Replace-question/m-p/387626#M71015</link>
    <description>In your example, all of the good data comes after the tags. Did you know that you can handle this with string functions?&lt;BR /&gt;&lt;BR /&gt;One way is to use reversestring() and replacefirst() as reversestring(replacefirst(reversestring([field]),"&amp;gt;",'|'))&lt;BR /&gt;&lt;BR /&gt;Then you could use a text to columns and parse the data.&lt;BR /&gt;&lt;BR /&gt;Instead of replacefirst, you could use findstring to find the first (last) &amp;gt; sign and then use that value to take the right() most values.&lt;BR /&gt;&lt;BR /&gt;Regex_replace([field],".*&amp;gt;(.*)",'$1')&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 13 Mar 2019 10:47:16 GMT</pubDate>
    <dc:creator>MarqueeCrew</dc:creator>
    <dc:date>2019-03-13T10:47:16Z</dc:date>
    <item>
      <title>Another Regex Replace question</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Another-Regex-Replace-question/m-p/387609#M71012</link>
      <description>&lt;P&gt;I have a regex question. I have many strings, some of which contain a varying number of&amp;nbsp;&amp;lt;&amp;gt; tags embedded in the text. One example is (italics added by me):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;lt;span style=""&amp;gt;D&amp;lt;/span&amp;gt;&amp;lt;span style="font-family: sans-serif;"&amp;gt;uring the last portoflio review we. &amp;lt;/span&amp;gt;&amp;nbsp; &amp;lt;br&amp;gt;&amp;nbsp; &amp;lt;span style="font-family: sans-serif;"&amp;gt;&amp;nbsp;The term loan we own for (TLB-6 USD 2 purchased at&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like all of the &amp;lt;&amp;gt; including the text between removing. That would leave the above text as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;During the last portoflio review we.&amp;nbsp;The term loan we own for (TLB-6 USD 2 purchased at&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some of the strings have no &amp;lt;&amp;gt; tags, others have quite a lot. Any solution would need to be able to manage this inconsistency in this free text field.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 22:12:29 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Another-Regex-Replace-question/m-p/387609#M71012</guid>
      <dc:creator>AndrewW</dc:creator>
      <dc:date>2024-06-13T22:12:29Z</dc:date>
    </item>
    <item>
      <title>Re: Another Regex Replace question</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Another-Regex-Replace-question/m-p/387626#M71015</link>
      <description>In your example, all of the good data comes after the tags. Did you know that you can handle this with string functions?&lt;BR /&gt;&lt;BR /&gt;One way is to use reversestring() and replacefirst() as reversestring(replacefirst(reversestring([field]),"&amp;gt;",'|'))&lt;BR /&gt;&lt;BR /&gt;Then you could use a text to columns and parse the data.&lt;BR /&gt;&lt;BR /&gt;Instead of replacefirst, you could use findstring to find the first (last) &amp;gt; sign and then use that value to take the right() most values.&lt;BR /&gt;&lt;BR /&gt;Regex_replace([field],".*&amp;gt;(.*)",'$1')&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;Mark&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 13 Mar 2019 10:47:16 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Another-Regex-Replace-question/m-p/387626#M71015</guid>
      <dc:creator>MarqueeCrew</dc:creator>
      <dc:date>2019-03-13T10:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: Another Regex Replace question</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Another-Regex-Replace-question/m-p/387636#M71017</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/4236"&gt;@AndrewW&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;A formula tool with a simple REGEX_Replace seems to be working here. Try it out on your data and let me know if it works for you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;REGEX_Replace([Field1], "&amp;lt;.*?&amp;gt;", "")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This tells Alteryx to remove everything contained in the &amp;lt;&amp;gt;, no matter how many there are. The ? keeps the text to be removed bound within the &amp;lt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it doesn't work, then I'd recommend adding a Record ID tool to mark each row with an identifier. Then a Regex Parse, tokenizing into rows, using this as the expression: (^|.*?)(?:&amp;lt;.?&amp;gt;). Follow it with a Summarize tool, where you group by the record ID and concatenate the text back together with no delimiter&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Cheers!&lt;/P&gt;&lt;P&gt;Esther&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 11:39:18 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Another-Regex-Replace-question/m-p/387636#M71017</guid>
      <dc:creator>estherb47</dc:creator>
      <dc:date>2019-03-13T11:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Another Regex Replace question</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Another-Regex-Replace-question/m-p/387733#M71041</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.alteryx.com/t5/user/viewprofilepage/user-id/6304"&gt;@estherb47&lt;/a&gt;&amp;nbsp;, I hoped there would be a simple regex solution for this :-)&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 14:03:33 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Another-Regex-Replace-question/m-p/387733#M71041</guid>
      <dc:creator>AndrewW</dc:creator>
      <dc:date>2019-03-13T14:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Another Regex Replace question</title>
      <link>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Another-Regex-Replace-question/m-p/387741#M71043</link>
      <description>&lt;P&gt;Thanks for the suggestion Mark, sadly doesn't work for all scenarios, but appreciate the response&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2019 14:05:18 GMT</pubDate>
      <guid>https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Another-Regex-Replace-question/m-p/387741#M71043</guid>
      <dc:creator>AndrewW</dc:creator>
      <dc:date>2019-03-13T14:05:18Z</dc:date>
    </item>
  </channel>
</rss>

