Replaced '\ ' with '\s' in regex for easier debugging, legibility, and maintainability.