I am trying to extract the FQDN and port number from a standard Oracle connection string. I have figured out how to extract the FQDN and PORT individually, but I am looking for a single php regexp, which will allow me to extract all FQDN and PORT at the same time.
Sample Connection String:
(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=FQDN1)(PORT=1234))(ADDRESS=(PROTOCOL=TCP)(HOST=FQDN2)(PORT=5678))(ADDRESS=(PROTOCOL=TCP)(HOST=FQDN3)(PORT=9012))(ADDRESS=(PROTOCOL=TCP)(HOST=FQDN4)(PORT=3456)))(CONNECT_DATA=(SERVICE_NAME=STUFF)))
My expected result would be an array:
[0][0] => FQDN1, [0][1] => 1234,
[1][0] => FQDN2, [1][1] => 5678,
[2][0] => FQDN3, [2][1] => 9012,
[3][0] => FQDN4, [3][1] => 3456
Any help from you guys will be appreciated.
Thanks.