Regex to find unclosed image tags In notebook: Work Notes Created at: 2016-08-10 Updated: 2016-08-10 Tags: searchText.replace(/<img((\s\w{3,6}="[\w|:|\/|.|;|\-|\s|%|\#]*")*)\s*>/gm, "<img $1 />")