Unit test regex methods.