Dynamically update matcher based on text! #11584
-
|
I have a use case where I need to apply matcher rules based on input text. Steps look like:
Is it possible to dynamically add/remove/recreate patterns in matcher based on the input text? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
This is possible, but it's kind of a weird thing to do. Usually you can just register all your patterns and ignore matches on patterns you don't want to use. For example, sometimes I make different Matcher objects and use them behind different branches (if statements) in code, but even that is rarely necessary. Can you be more specific about why you want to do this? |
Beta Was this translation helpful? Give feedback.
This is possible, but it's kind of a weird thing to do. Usually you can just register all your patterns and ignore matches on patterns you don't want to use. For example, sometimes I make different Matcher objects and use them behind different branches (if statements) in code, but even that is rarely necessary. Can you be more specific about why you want to do this?