Regex fix to allow for proper mongodb regexes to be passed (with operato...

...rs on the far side

Finally got around to testing and implementing this.

@gfranczyk Can you please review this one when you get a moment.