integrated regex into string functions