Skip to content

Instantly share code, notes, and snippets.

@beezly
Created October 3, 2012 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beezly/3827209 to your computer and use it in GitHub Desktop.
Save beezly/3827209 to your computer and use it in GitHub Desktop.
Moustachify TrafficScript
$body = http.getResponseBody();
$newBody = string.regexsub ( $body ,
'<img([^>]+)src=([\'"])([^\'"]+)',
'<img$1src=$2http://mustachify.me/?src=http://www.shef.ac.uk/$3',
'gi' );
http.setResponseBody($newBody);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment