Fixed regex search bug in Firefox