Implement regex() and match() functions.

Refs #5789