By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,621 Members | 1,101 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,621 IT Pros & Developers. It's quick & easy.

Regexp to enclose text with P-tag

P: n/a
I'm looking for help writing a regexp to enclose text with a <p> tag.
The rule is that other HTML tags in the text like <img> and other
block elements should NOT be enclosed by <p>.

lorem ipsum <img src="image.gif" />dolor

should become:

<p>lorem ipsum</p><img src="image.gif" /><p>dolor</p>

Can anyone help me with this? :)
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.