How to replace the first and last letter in EditPad?

31 Views Asked by At

In EditPad I want to replace <foo far baz> to <p>foo far baz</p>

To serach/locate the string I use: <.*?\w>

My question is, how to write the replace command? On https://www.regular-expressions.info/refreplacebackref.html I could not find command to replace the first and last letter.

Thanks for the help!

1

There are 1 best solutions below

0
Thm Lee On BEST ANSWER

You can try this regex,

(\<)([^<>]*)(\>)

and replace with

\1p>\2</p\3