Coverting text to italics

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
JBNY
Posts: 7
Joined: Wed Mar 25, 2009 7:24 pm

Coverting text to italics

Post by JBNY »

I searched but could not find this answer.

Using ver 5.2 I am converting some txt files to html and am trying to deal with how italics are treated in many text files, I need to do this

_some text is here_
or
*some text is here*

and covert it to

<i>some text is here</i>

The text between _ or * is always different, any ideas how to do this?

Much thanks!
-Joe
ben_josephs
Posts: 2461
Joined: Sun Mar 02, 2003 9:22 pm

Post by ben_josephs »

Find what: _([^_]+)_|\*([^*]+)\*
Replace with: <i>\1</i>

[X] Regular expression

Replace All
This assumes you are using Posix regular expression syntax:
Configure | Preferences | Editor

[X] Use POSIX regular expression syntax
JBNY
Posts: 7
Joined: Wed Mar 25, 2009 7:24 pm

Post by JBNY »

That worked perfect. Thank You!
-Joe
Post Reply