BCCOM-156: Updated how the first character of the regex string is accessed so it will work in IE7+