This is a follow up to another thread,
I am trying to eliminate Rich text formatting. I tried to copy-and-paste to a clipboard, to simulate Notepad's stripping capabilities without success.
Another approach is to use regular expressions to eliminate the extra coding. I'm not sure how to do this in Access.
advises
advises, "A co-worker of mine, Scott Jennings, a.k.a. the “RegEx-Man”, came up with the following expression to do the job:"
I'm not sure how to implement this in Access 2003. Suggestions will be most appreciated.
Alan
I am trying to eliminate Rich text formatting. I tried to copy-and-paste to a clipboard, to simulate Notepad's stripping capabilities without success.
Another approach is to use regular expressions to eliminate the extra coding. I'm not sure how to do this in Access.
advises
Code:
Then, construct a regexp like this:
\{[^\}]+\} and replace every match with empty string.
advises, "A co-worker of mine, Scott Jennings, a.k.a. the “RegEx-Man”, came up with the following expression to do the job:"
Code:
Regex.Replace(Regex.Match(rtf, @"\x5cviewkind4[^ ]*(.+)\x5cpar").Groups[1].Value, @"[\n\r\f]|(\x5cpar)|(\x5c[a-zA-Z0-9]+)", "");
I'm not sure how to implement this in Access 2003. Suggestions will be most appreciated.
Alan