Simplifies the scrub_pattern function:

Readability
4 spaces indenation
Use full keyword names (func => function)
Substitute only the ^ as $ make sense for line and column search