generate_changelog.actions.text_processing.FirstRegExMatch

FirstRegExMatch#

class generate_changelog.actions.text_processing.FirstRegExMatch[source]#

When called, returns the first match in a string using a predefined regex.

named_subgroup: Optional[str] = None#

The named subgroup defined in the pattern to return.

default_value: Union[str, Callable[[], str]] = ''#

The value to return if no match is found.

__call__(input_text)[source]#

Search the input_text for the predefined pattern and return it.

Return type:

str

Parameters:

input_text (str | Callable[[], str]) –

__init__(pattern, ascii_flag=False, ignorecase_flag=False, locale_flag=False, multiline_flag=False, dotall_flag=False, verbose_flag=False, named_subgroup=None, default_value='')#
Parameters:
Return type:

None