Changing attributes for HTML style marked text - How? 
Author Message
 Changing attributes for HTML style marked text - How?

Greetings,

I'm using a startup macro to add style to an ASCII text
file by a combination of DOT settings and "tags" for each
style I want to apply. It works fine, but there's one
thing that I cannot figure out.

Let's say I have a sentence looking like this:

"The cars on the street were Blue."

I want to make the three words "on the street" go bold
while the rest of the text remains unchanged. My idea is
to add tags to the text, like it's done in HTML:

"The cars <BOLD>on the street</BOLD> were Blue."

I'm stuck with figuring out how to select only the text
within the tags...

Any hints appreciated!

TIA
Jon



Mon, 11 Apr 2005 02:46:41 GMT  
 Changing attributes for HTML style marked text - How?
"> "The cars <BOLD>on the street</BOLD> were Blue."

Quote:

> I'm stuck with figuring out how to select only the text
> within the tags...

Hi Jon,

In "Edit > Replace...", check "Match wildcards", then search for
        Find what: \<BOLD\>(*)\</BOLD\>
        Replace with: \1    ((with Format > Font > Bold,
                                       or press Ctrl+B while in the Replace
box))

The characters < and > have to be \escaped with a backslash in wildcard
searches, because they are used as wildcards (word anchors).
(*) will match anything between <BOLD> and </BOLD>, and \1 re-uses that
bracketed stuff in the replacement.

Greetings,
Klaus



Mon, 11 Apr 2005 04:06:31 GMT  
 Changing attributes for HTML style marked text - How?

Klaus,

Thanks a million! Precisely what I was looking for. You
saved this nights sleep, and probably many nights to
come...  :-)

Cheers
Jon



Mon, 11 Apr 2005 04:33:55 GMT  
 Changing attributes for HTML style marked text - How?

Quote:
> You saved this nights sleep, and probably many nights to
> come...  :-)

With me it's the opposite: I answer questions here when I can't sleep ;-)

Klaus



Mon, 11 Apr 2005 09:56:02 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Mark Bold Text then Mark Italic Text

2. Problem with Styles - in normal style Carriage return changes style to Heading 2

3. Can I Change attributes in Unbound Text field?

4. Text boxes randomly change attributes

5. change font attributes in task text

6. Text attributes change after INCLUDE

7. Help - Can't Change Merged Text Font Attributes

8. How to change predefined styles in HTML mail?

9. Style changing during composing a message in HTML format

10. Changing from Plain Text or Rich Text to HTML


 
Powered by phpBB® Forum Software © phpBB Group