pyrit.prompt_converter.RegexSelectionStrategy#
- class RegexSelectionStrategy(*, pattern: str | Pattern[str])[source]#
Bases:
TextSelectionStrategySelects text based on the first regex match.
Methods
__init__(*, pattern)Initialize the regex selection strategy.
select_range(*, text)Select the range of the first regex match.