0
我有一個短代碼。我想提取所有屬性及其值,並將它們放入數組中。正則表達式將短代碼解析爲數組
這是簡碼:
[res_map address="Yeronga QLD 4104, Australia" description="<img src='http://localhost/wordpress/wp-content/plugins/responsive-maps-plugin/includes/img/company.png'> {br} Yeronga QLD 4104, Australia {br} Phone: 0040 752 235 756" directionstext="(directions to our address)" icon="blue" iconsize="" style="2" scalecontrol="no" typecontrol="no" streetcontrol="no" locateme="no" zoom="13" zoomcontrol="no" draggable="yes" scrollwheel="no" searchbox="no" clustering="no" logging="no" poi="yes" fullscreen="no" width="100%" height="500px" maptype="roadmap" popup="no" center="" refresh="yes" key="AIzaSyDZ0ucX5SAiseQTn72Iw-An6fm0n2S71RA"]
的描述屬性中可以有任何HTML內容。我需要從這個簡碼中創建一個數組,如下所示:
address=>Yeronga QLD 4104, Australia
description=><img src='http://local.....lia {br} Phone: 0040 752 235 756
directionstext=>(directions to our address)
icon=>blue
等等其他屬性。
什麼是正確的正則表達式?
有沒有「在字符串中。你很快:)解決方案的作品,非常感謝你! –