0
的價值我有看起來像這樣的鏈接負載:正則表達式的HTML屬性
<A HREF="http://www.taboola.com/" ADD_DATE="1385139696" ICON="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACx0lEQVQ4jXWTTWhdZRCGn5nvu+ee5CaxiTGtqUaKiJjYRRFNukhBIgUlCzeuFCy0lZaCUCiuBI8LQXcWRURFUXAjbq0i3fgTaFGktaVmowuRGhqsNya59557zjfjIkosxHc18MAsnplX2I7AJ7o1XnMoHPBtVghMyw4MoFB2TKHg8v8MtuHM2alsfOghsFws3CyXf11itdgAYKwYyWfuetiwXeZxrb764/e0X28DKgDNQ++eamTNlyWE2wkZ1B3MwrXNtc7TUA22bhv5QNXuI+RC6pFMfi675fNp6fg5Ye6dx4eG83MawOp6VdBl9/qgZgPRqv4K7lGz5rhV3b4QL5un6dDIW1ZXGxtrm/PazPWoCm5GKsv6hfXzRw7VST7EJYnYhCijuFtV+dn180fmyiq96p5MQhhqNuMzqrGxFxy3qq666fI/4r5BJAA1buaG1CZfURQEkYuYieAWGuxTr+q/UHGRRiCGPVCYO9M4vuVYEFVikLspCjO3SSSAI2a0g0wuZiFvPqkkCSoPxn2LMzGGZ0V80JI7IlEEFH8gm3pit8Z4LCjjjkjZqV4K9tv6Fd87MxqygdnQHNwTmyOzojKYzDu9bv9oEi6EkB3WbGBMB0fnVeMd7iplr/9avXT8LQECkJh7fzbP02Nissvxdq/b/4zvTl0CiAffXmhketiRYdz/6PXTF1w4uQSIAJI9+tErkbrX6fQ/5eKJZcB2/r4zLWbv3z8wkj2VyvKH/tfPfRwB1+CPZK2JBQ03XvSF91ZdGr8grIh7BwwnDIFPiqV7Nei4tiakX10/DRAB6uRf1t32AYn5WNAwCT65dQHH3QFFZKs9bjX15s3rnvzKrV048OY9zeGBxdiI8yK2H6/HQXLAEN109IYnu1Ql+7ZaXf+cn07/DmT/LpBb6rn7TIupO8fQxjApJnp/trm60oY3yv8IEYC/AVWrRrXbUwqeAAAAAElFTkSuQmCC">Taboola - Content you may like</A>
我想刪除整個ICON
和ADD_DATE
屬性和值。
我使用的崇高與正則表達式查找/替換,但我不知道如何寫正則表達式搶在ICON="
"
之間
任何幫助,將不勝感激一切!
要獲取ICON的屬性,只需使用以下REGEX,'ICON = \「(。*)」'這將把變量間的所有字符置於引號之間 – spacebiker
@Xabier:只有在沒有其他引用標記... – Ryan
@Xabier這將抓住所有的文字,直到最後的「 – Christophe