Fix regex and add tab support