Correct the function source regex to work in IE