Prolog and Regular Expressions