Added regex for pattern matching