Python Create Regex From Variable Cost