RegexTransformer (autotransform.transformer.regex)¶
The implementation for the RegexTransformer.
- class autotransform.transformer.regex.RegexTransformer(*, pattern: str, replacement: str)¶
Bases:
SingleTransformer
A Transformer that makes regex based changes, replacing instances of the provided pattern with the provided replacement. Useful for simple transformations. Operates on FileItems.
- pattern¶
The pattern to search for.
- Type:
str
- replacement¶
The value to replace the pattern with.
- Type:
str
- name¶
The name of the component.
- Type:
ClassVar[TransformerName]
- name: ClassVar[TransformerName] = 'regex'¶
- pattern: str¶
- replacement: str¶