Added regex function