I need a regex to find the contents of the hrefs from these a tags :
how about spaces around = ? this code will fix it:
var matches = str.match(/href( *)=( *)("|'*)(.*?)("|'*)( |>)/); console.log(matches);