I get the html and a part of it from where I need to extract the data and this one
<td class="address-list-item">
NOme silva <div class="modal-content" style="display:none;">
<div class="address-list-modal">
<h2 class="title title-5">Excluir endereço</h2>
<h3 class="title title-7">Deseja realmente excluir esse endereço?</h3>
<div class="address-default-title">NOme</div>
<div class="address-default-item">Rua </div>
<div class="address-default-item">CEP - SETOR </div>
<div class="address-default-item">Cidade - Estado</div>
<a onclick="deleteAddress(00000)" class="btn btn-9" "="" href="javascript::void(0)">Sim</a>
<a onclick="clModal()" class="btn btn-9" href="javascript::void(0)">Não</a>
</div>
</div>
</td>
<td class="address-list-item">
Rua -
cep - setor -
Cidade - Estado
</td>
<td class="address-list-item">
(00) 0000-0000 </td>
<td class="address-list-item is-last">
<a class="sel-link-edit-addicional-0000 address-list-item-link" href="/customer/address/edit/?address_id=000">
Editar </a>
<span class="bt_separator">|</span>
<a id="bt-delete-0000" class="address-list-item-link" href="javascript::void(0)" onclick="confirmationModal(this,0000)">
Excluir </a>
</td>
</tr>
I need to extract only the City - State
So I did my regex as well
if (preg_match("#- (.*?) - \b[A-Z][A-Z]#", $this->http_response, $match))
$estado = $match[0];
return $estado;