Are wildcards all what I need?

P

Pawel

Hello,

I have following problem.

I need to remove format strings from whole text. It looks
like:

{\cf2 This is {\cf1 a} sample text.}

What is after \cf2 and inside brackets should be blue but
after \cf1 should be brown. So whole sting in blue but 'a'
brown.

In the same operation formatting strings and brackets
should be removed.

Can I do that just with wildcards?

Please also notice that my text is full of some other
strange formatting substrings. So any search string should
be able to select and then process only required
information.

Thanks a lot.
 
D

Doug Robbins - Word MVP

Hi Pawel,

See the article "Finding and replacing characters using wildcards" at:

http://www.mvps.org/word/FAQs/General/UsingWildcards.htm

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
K

Klaus Linke

Hi Pawel,

I think you might be better off writing a parser. If this is RTF, you need
to keep in mind that all of the following would describe the same
formatting:
· {\b bold {\i Bold Italic }Bold again}
· {\b bold \i Bold Italic \i0 Bold again}
· {\b bold \i Bold Italic \plain\b Bold again}
(example from the RTF specs)

Regards,
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top