Sublime Forum

Macro for a complicated delete

#1

I have the text you see below. I need to set up a macro that deletes from the space before ADD all the way down to and including the " before > I have scads of this to! Thanks for any help – David

<A HREF=“http://www.library.unr.edu/subjects/guides/beowulf.html#inspire” ADD_DATE=“1117919041” ICON=“data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACEUlEQVQ4ja2TX0hTcRTHP96NWA6qa86MjOwWGa5A3MKEEMHrGqOIyEmwkkC49yUIetmL9OTLgkLoaReKEKLY6CEIsrnApxDasEIqAi9mYFLOW0R/iPT04Ca4P28dOA/nnO/vy/f8OF+ojDbgBpAD/hYzV+y1lYPryuqrwOjgUGjrofZ97G1tBuDj/BLv33wgNZ75BYwAN8sJtgCPekPBcP+p4zQ1N1QRBp+XVph8PM1UJjcBnAH+lGZjfZEuuXbdkB69UwDpDQUFkB69UwYu9otvl7rR74t0SXElFOAocHnggs5UJkcsaiIivHoxh4gQi5p8/SRMP88hInwvCMe6/QBXgHYFGD5/6aTL7XZtkmsYBgCWZZFKpXAch0QigW3b7G5pZHAo5AKG3UDY33GwYl/DMEin0+i6jqqqmKaJr8VDfHSIeq8Hf8cBGCesAPsbm3ZUEGiaRjqdRtM0APL5POdifez0bQdAbdgGsEep+t3F0HW95kxR6gBcCrCwsvytApDNZolGo9i2DUAgEODhvWcUvqxjC+tvFhRgYvblXAWBZVmoqrpRJ5NJertPkxgZ5+eP37x9bQNMKoB1/86T1bU1qVDgOA6BQADTNNE0jXg8jqZpLC0u8+Du01Xgdgl/q9oh1Xs9Euxul8jZE1Lv9ZQf0hj8h1OuaabDR1o3mend7HxVM1WLkp1nACnmDDXs/A/2K9T++za2rQAAAABJRU5ErkJggg==”>

0 Likes

#2

One way to do this would be to use the Find and Replace panel with a regular expression search.

You can search for ADD_DATE=".*" (note: there is a single space before the ADD_DATE, since you want to capture and replace it too) and replace it with nothing.

0 Likes