Started work on the first regex function. These look tricky.