Regex matching can be applied to strings