Changing <p> to <br>

Is it possible to find all <p> tabs in a string and replace them with <br> tabs?

For example, if I have a string which looks like this:

<p>some test here</p>
<p>some more test here</p>
<p>some other test here</p>

Is it possible to change it to the following:

some test here<br /><br />
some more test here<br /><br />
some other test here<br /><br />

Answers


In what language? PHP?

$text=str_replace(array('<p>','</p>'),array('','<br /><br />'),$text);

Need Your Help

HTC Face Unlock Training

android android-intent android-4.0

As described in this question on android.se regarding Face Unlock on HTC phones, it was discovered that HTC in all their wisdom have removed the ability to 'train' faces from their settings menu.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.