Fixed regex and match so that IE 8 would work like everyone else.