fix CodeMirror search failing with RegExp syntax

Commit e6b16d80 broke this by trying to access the undefined isRE
Merge pull request #1537 from blandinw/patch-1

fix CodeMirror search failing with RegExp syntax