This is not directly related, but a while ago I signed up for https://github.com/adobe/brackets/pull/5457

The pull removed the lines below the TODO and I have verified the fix in CM this is related to. So I think it's safe to merge the pull request. But since you are in the middle of that code here, let me know if you have objections to merging. I have successfully tested expressions like /.+/, /.*/