regex_pattern tokenizer tokenizes text using a regular expression. The regular expression can be specified with the pattern parameter.
For instance, the following tokenizer creates tokens only for words starting with the letter h:
- Look-around assertions such as
(?=...) - Backreferences such as
\1
\b) and lazy quantifiers (+?) are supported, as the examples on this page show.
To get a feel for this tokenizer, run the following command and replace the text with your own:
Expected Response