Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to remove script code

Status
Not open for further replies.

dand11

Programmer
Jun 24, 2008
63
US
I am retrieveing data from a Pervasive database and the data is being preceded by some sort of scripting code which looks like this:
Code:
rtf1\ansi\ansicpg1252\uc0\deff0{\fonttbl {\f0\froman\fcharset0\fprq2 Times New Roman;} {\f1\froman\fcharset2\fprq2 Symbol;}} {\colortbl;\red1\green0\blue0;\red255\green255\blue255;} {\*\generator TX_RTF32 10.1.323.501;} \deftab1134\pard\qj\li120\ri240\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\tx9360\tx10080\plain\f0\fs24\cf1\tab  Then the long paragraph from the database is placed here.

Is there a way to use a Rich Texbox object inside of a c# class to remove the script?
 
I would probably do this at the SQL level. You will have to find some way to designate where the actual text you want starts. If they all have "\tab " then the paragraph, then you can easily remove from the first char to that point.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top