Fixing regexp called method problem