Test a text with the regex pattern.