Slight adjust to: contents.match(/[^\(]+\.(gif|jpg|jpeg|png)/g)

Printable View