As the original option use Vim's regex, I don't know whether it is possible to write Python code which is fully compatible to it. Also see the last comment.