add regex support

see #9
Is this ok?