Added support to regexp operation, based on pull request from @NickBeeuwsaert (thanks!), minor modifications