Regular expressions for Prolog