Allow raw regex filters

I want to write a raw regex pattern filter but it is currently not possible. This fixes it in a backwards compatible way.