Updated solution

Added regexep verification.