All pastes #750003 Raw Edit

Anonymous

public text v1 · immutable
#750003 ·published 2007-10-26 03:29 UTC
rendered paste body
I need a script to go in and grep following inside of a file (text):

###
SOME CONTENT SNIP

local url_check =
{
GET LINES BELOW
---
["/images/one.jpg"] = true, -- timestamphere
["/images/foo.jpg"] = true, -- timestamphere
["/images/baz.jpg"] = true, -- timestamphere
---
GET LINES ABOVE
}

SOME CONTENT SNIP
##

Explode those lines to $line, $timestamp (very easy), save to array then when I need it script
should go back to file and replace content with new lines in exacly same spot, overwriting old.