newbie raw text question

Ian Sparks Ian.Sparks at etrials.com
Mon Feb 3 15:11:09 EST 2003


I'm confused about this one. I'm reading some RTF formatted data from a database. The resulting string is :

{\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss Arial;}{\f3\fswiss Arial;}}
{\colortbl\red0\green0\blue0;}
\deflang1033\pard\plain\f3\fs16 Some text
}

obviously this is chock-full of escaped characters. I need to strip the RTF codes and all my regular expressions are expecting raw strings but I don't see a way of converting an escaped string to a raw string to use in the regex.

There must be some way out of here...

 





More information about the Python-list mailing list