Added Regex function - apply_regex