Refactor regex definition to __init__