I've got a regex that looks for a <span> with the class name foobar. It works in IE9, Chrome and Firefox. It's failing in IE7 and IE8. Can anyone tell me why?
new RegExp( /(\s*?)<span\b(?:.*?)(?:class=(?:'|"|.*?\s)?foobar(?:\s|\3))(?:.*?)(?:\/)?>(.+?)<\/span>(\s*?)/g )