Hi I have the this html:
<div class="c-disruption-item c-disruption-item--line">
<h3 class="c-disruption-item__title" id="11e62827-9f9c-48b2-8807-09f6b6ebeec6" name="11e62827-9f9c-48b2-8807-09f6b6ebeec6"> <a>Closure of London Road</a> </h3>
<ul class="c-disruption__affected-entities">
<li>Affected routes:</li>
<li> <a href="/services/RB/X4#disruptions" class="line-block" style="background-color: #A38142; color:#FFFFFF">
<div class="line-block__contents">
X4
</div> </a> </li>
</ul>
<p>The left turn from Wiltshire Road on to London Road will be closed between 10.00pm and 5.00am on the nights of 27/28 and 28/29 April 2020.<br> <br> Lion X4 affected as follows:-<br> <br> Journeys towards Bracknell will be diverted and unable to serve the Seaford Road bus stop. Please use the Three Frogs bus stop instead.<br> <br> Journeys towards Reading are not affected and should follow normal route.<br> <br> We are sorry for the inconvenience caused.</p>
</div>
And I want to select whatever comes before and after the <ul></ul>
section meaning not this:
<ul class="c-disruption__affected-entities">
<li>Affected routes:</li>
<li> <a href="/services/RB/X4#disruptions" class="line-block" style="background-color: #A38142; color:#FFFFFF">
<div class="line-block__contents">
X4
</div> </a> </li>
</ul>
But! if this section does not exist i want to select all.
I tried this selection ([\W\w]+(?=\<ul)|(?<=ul>)[\W\w]+)
but it doesn't work if the <ul><\ul>
not exist.
The selection have to be regax alone.
Does somebody have an idea?
thanks