I have pages with HTML that look like this:
<div class="row">
<div class="col-md-12">
<h2>Some Title</h2>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
</div>
Now I need to have the first Lorem ipsum text wrapped in <p></p>
tags aswell. Is there a way to detect this and do it with regex?
I would be using regex to make these changes directly in the database.
` ? What language are you using here? is this in happening in the server?
– vsync Jul 31 '19 at 07:00?
– turtlehamster Jul 31 '19 at 07:42` and `
`. – Federico klez Culloca Jul 31 '19 at 07:45with this text. You want ? Warning: I don't know how to remove another before text without elements.
– deon cagadoes Jul 31 '19 at 07:45and sometimes there is no second paragraph, just plain text.
– turtlehamster Jul 31 '19 at 08:11