Thread: Regex Problem
View Single Post
Old 05-09-2011, 02:34 AM   #1
huebi
Zealot
huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!huebi , Klaatu Barada Niktu!
 
Posts: 121
Karma: 5070
Join Date: Dec 2010
Device: none
Regex Problem

Hi,

how can i change


Code:
<div>
  sentence1<br />
  sentence2<br />
  sentence3<br />
  sentence4<br />
</div>
into

Code:
<p>sentence1</p>
<p>sentence2</p>
<p>sentence3</p>
<p>sentence4</p>
The Problem is there several amounts of sentences, sometimes 2, sometimes 3, sometimes more. Is there a way to do that with a regex? There are more then 500 div-sections, so doing that manually is a pain. A workaround might be doing it with 2, then 3, then 4 and so speratly.

thx in advance
huebi is offline   Reply With Quote