A React component that matches text using specified rules, supporting string and regular expressions.