Because the same symbol is used to start and end the italicised text, this is quite hard.
If each section of italicised text begins and ends on the same line, and if there is at most one such section on any one line, then you can use the following:
Find what: \\i(.*)\\i
Replace with: <i>\1</i>
[X] Regular expression
This assumes you are using POSIX regular expression syntax:
Configuration | Preferences | Editor
[X] Use POSIX regular expression syntax
This doesn't work in TextPad if the italicised sections span newlines, as TextPad's regular expression recogniser doesn't support regular expressions containing variable numbers of newlines.
It also doesn't work in TextPad if there is more than one italicised section on one line, as the above regular expression will match everything from the first
\i on the line to the last
\i on the line. If there are no backslahes (
\) within the italicised sections, you can avoid this problem with
Find what: \\i([^\]*)\\i
Replace with: <i>\1</i>
[X] Regular expression
Better solutions are available with WildEdit (
http://www.textpad.com/products/wildedit/), which uses the far more powerful Boost regular expression recogniser. In WildEdit
Find what: \\i(.*?)\\i
matches lazily (matching the shortest subexpression instead of the longest), solving the second problem above. And you can choose to have a dot (
.) match newlines, solving the first problem.