<?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: Convert rtf text to plain text in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843800#M4874643</link>
    <description>&lt;P&gt;FWIW, are you sure the RTF text does not contain embedded images, or could they be ignored during the conversion?&lt;/P&gt;</description>
    <pubDate>Thu, 19 Oct 2017 17:16:01 GMT</pubDate>
    <dc:creator>VolkerBarth</dc:creator>
    <dc:date>2017-10-19T17:16:01Z</dc:date>
    <item>
      <title>Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaq-p/13843790</link>
      <description>&lt;P&gt;Is there any function in sybase to convert rtf text to plain text.
We use SA17&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 04:12:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaq-p/13843790</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-10-16T04:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843791#M4874634</link>
      <description>&lt;P&gt;No, SQL Anywhere does not have any functions to convert documents from one format to another. You will need to use some external application to do this type of operation.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 08:27:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843791#M4874634</guid>
      <dc:creator>MarkCulp</dc:creator>
      <dc:date>2017-10-16T08:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843792#M4874635</link>
      <description>&lt;P&gt;Ok, thanks for your reply. I have googlat and tried to find some help but it seemed to be sparse. Thought if I could do it with a procedure or reached.
Have you done it lately with any external application?&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 08:31:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843792#M4874635</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-10-16T08:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843793#M4874636</link>
      <description>&lt;P&gt;Depending on the expected content of the rich text, there are several examples posted on the internet that use regular expressions that can do this for most rich text.&lt;/P&gt;
&lt;P&gt;There are also several examples using Java and C# (.NET CLR). The C# version uses a MS RichTextBox control text property which contains the text of the control excluding the rich text format codes. You could then use the external environment feature to access the Java or .NET CLR code like a procedure.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2017 10:30:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843793#M4874636</guid>
      <dc:creator>chris_keating</dc:creator>
      <dc:date>2017-10-16T10:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843794#M4874637</link>
      <description>&lt;P&gt;I would rather try to use SA to solve this.
Where can I find an example using regular expressions? Or do you have any examples?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2017 02:19:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843794#M4874637</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-10-17T02:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843795#M4874638</link>
      <description>&lt;P&gt;Mark, Do you have any example to solve this with regular expressions?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 13:47:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843795#M4874638</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-10-18T13:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843796#M4874639</link>
      <description>&lt;P&gt;FYI here is &lt;A href="http://www.biblioscape.com/rtf15_spec.htm"&gt;&lt;B&gt;one version of the RTF specifications&lt;/B&gt;&lt;/A&gt;... are you sure you want regular expressions to deal with that?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 15:13:33 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843796#M4874639</guid>
      <dc:creator>Breck_Carter</dc:creator>
      <dc:date>2017-10-18T15:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843797#M4874640</link>
      <description>&lt;P&gt;Thanks!
I'm open to other suggestions if they work with SA17.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 15:37:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843797#M4874640</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-10-18T15:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843798#M4874641</link>
      <description>&lt;P&gt;As Breck clarified with the RTF spec and I hinted in my initial response, this will be difficult to achieve with regular expressions except in some specific cases. Most of the threads that I read on line on this topic suggested that a parser would be the only real solution to this. I proposed taking advantage of java or .NET as they have existing objects that can do that heavy lifting and can be used as an external environment in SQL Anywhere.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 16:10:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843798#M4874641</guid>
      <dc:creator>chris_keating</dc:creator>
      <dc:date>2017-10-18T16:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843799#M4874642</link>
      <description>&lt;P&gt;Hm, I see a good option: textutil (BSD, MacOS): &lt;A href="http://osxdaily.com/2014/02/20/batch-convert-docx-to-txt-mac/"&gt;http://osxdaily.com/2014/02/20/batch-convert-docx-to-txt-mac/&lt;/A&gt;
It is not to find a console library that converts from RTF to TXT (to HTML is possible, but not to TXT).&lt;BR /&gt;
I'd better close this question as "use 3rd-party tools".&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 05:12:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843799#M4874642</guid>
      <dc:creator>Vlad</dc:creator>
      <dc:date>2017-10-19T05:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843800#M4874643</link>
      <description>&lt;P&gt;FWIW, are you sure the RTF text does not contain embedded images, or could they be ignored during the conversion?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Oct 2017 17:16:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843800#M4874643</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2017-10-19T17:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843801#M4874644</link>
      <description>&lt;P&gt;Yes, it's only rtf text I want to convert to plain text.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2017 02:21:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843801#M4874644</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-10-20T02:21:00Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843802#M4874645</link>
      <description>&lt;P&gt;I have found this procedure as I modified a little. It almost works. What is missing is line breaks. Now these disappear. Anyone who has any idea?&lt;/P&gt;
&lt;DIV&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;/SPAN&gt;CREATE OR REPLACE FUNCTION GetTextFromRTF(in @LineIn long varchar)
returns long varchar
deterministic
begin
  declare @BraceCount integer = 0;
  declare &lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;@S&lt;/A&gt;tartCount integer = 0;
  declare @EndCount integer = 0;
  declare @LoopCount integer = 0;
  declare @InText integer = 0;
  declare &lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;@S&lt;/A&gt; long varchar = '';
  declare @P1 integer;


  while @LoopCount &amp;lt;= Length(@LineIn) loop
    if substring(@LineIn, @LoopCount, 1) = '{' then
      set @BraceCount = @BraceCount + 1
    end if;
    if substring(@LineIn, @LoopCount, 1) = '}' then
      set @BraceCount = @BraceCount - 1
    end if;
    if(substring(@LineIn, @LoopCount, 1) = ' ') and
      (@BraceCount = 1) and
      (@InText = 0) then
      set &lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;@S&lt;/A&gt;tartCount = @LoopCount + 1;
      set @InText = 1;
    end if;
    if(substring(@LineIn, @LoopCount, 1) = '\\\\') and
      (@BraceCount = 1) and
      (@InText = 1) then
      set @EndCount = @LoopCount;
      set &lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;@S&lt;/A&gt;= &lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;@S&lt;/A&gt; + substring(@LineIn, &lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;@S&lt;/A&gt;tartCount, @EndCount - &lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;@S&lt;/A&gt;tartCount);
      set @InText = 0;
    end if;
    set @LoopCount = @LoopCount + 1;
  end loop;
  return(&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/4/steve"&gt;@S&lt;/A&gt;)
end
&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 26 Oct 2017 05:53:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843802#M4874645</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2017-10-26T05:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: Convert rtf text to plain text</title>
      <link>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843803#M4874646</link>
      <description>&lt;P&gt;I found the same function and modified it as you did. I have two other mods in this one related to paragraphs and also dealing with characters in languages other than English i.e. accented characters. I haven't tried with Russian or anything but it was fine for a customer with Danish, Norwegian and Swedish.&lt;/P&gt;
&lt;P&gt;I don't remember why it has the bit at the top referencing rtf1 but see if it is of any use to you.&lt;/P&gt;
&lt;P&gt;ALTER FUNCTION "spaceman"."GetTextFromRTF"(in @LineIn long varchar)
returns long varchar
deterministic
begin
  declare @BraceCount integer;
  declare &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;tartCount integer;
  declare @EndCount integer;
  declare @LoopCount integer;
  declare &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;pecialPosition integer;
  declare @InText integer;
  declare &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt; long varchar;
  declare &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;pecialText long varchar;
  declare @P1 integer;
  set @BraceCount=0;
  set &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;tartCount=0;
  set @EndCount=0;
  set @LoopCount=1;
  set &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;pecialPosition=0;
  set &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;='';
  set &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;pecialText='';
  set @InText=0;&lt;/P&gt;
&lt;P&gt;if substr(@LineIn,1,6) !='{\\rtf1' then
  return(@LineIn)
  else&lt;/P&gt;
&lt;P&gt;set @LineIn = replace(@LineIn, '\\pard','\\perd');
  set @LineIn = replace(@LineIn, '\\par','\\par ');&lt;/P&gt;
&lt;P&gt;while locate(@LineIn, string(char(92), char(39)))&amp;gt;0 loop
    set &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;pecialPosition = locate(@LineIn, string(char(92), char(39)));
    if &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;pecialPosition &amp;gt;=1 then
      set &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;pecialText = substr(@LineIn, &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;pecialPosition, 4);
      set @LineIn = replace(@LineIn, &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;pecialText, char(hextoint(substr(&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;pecialText, 3, 2))));
    end if;
  end loop;&lt;/P&gt;
&lt;P&gt;while @LoopCount &amp;lt;= Length(@LineIn) loop
    if SUBSTRING(@LineIn,@LoopCount,1) = '{' then
      set @BraceCount=@BraceCount+1
    end if;
    if SUBSTRING(@LineIn,@LoopCount,1) = '}' then
      set @BraceCount=@BraceCount-1
    end if;
    if(SUBSTRING(@LineIn,@LoopCount,1) = ' ') and
      (@BraceCount = 1) and
      (@InText = 0) then
      set &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;tartCount=@LoopCount+1;
      set @InText=1
    end if;
    if(SUBSTRING(@LineIn,@LoopCount,1) = '\\') and
      (@BraceCount = 1) and
      (@InText = 1) then
      set @EndCount=@LoopCount;
      set &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;=&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;+SUBSTRING(@LineIn,&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;tartCount,@EndCount-
        &lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;tartCount);
      set @InText=0
    end if;
    set @LoopCount=@LoopCount+1
  end loop;
  return(&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/42/sergio"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;&lt;/A&gt;&lt;A href="http://sqlanywhere-forum.sap.com/users/101/steve-1"&gt;@S&lt;/A&gt;)
  end if;
end&lt;/P&gt;</description>
      <pubDate>Fri, 27 Oct 2017 08:14:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/convert-rtf-text-to-plain-text/qaa-p/13843803#M4874646</guid>
      <dc:creator>RADical_Systems</dc:creator>
      <dc:date>2017-10-27T08:14:26Z</dc:date>
    </item>
  </channel>
</rss>

