Page 1 of 1

Coverting text to italics

Posted: Wed Mar 25, 2009 7:30 pm
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!

Posted: Wed Mar 25, 2009 8:12 pm
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

Posted: Wed Mar 25, 2009 8:31 pm
by JBNY
That worked perfect. Thank You!