Nodes/comfy-ovum/re.search (Regex Search)
ComfyUI Node

re.search (Regex Search)

re.search(pattern, string, flags=0) Scan through string[s] looking for the first location where the regular expression pattern produces a match, and return a corresponding RE_MATCH_T. Return None if no position in the string matches the pattern; note that this is different from finding a zero-length match at some point in the string.

By sfinktah·Created 12 months ago·Updated 9 months ago· 6
re.search (Regex Search)
  • flags
  • match
pattern
string
string_in
pos0
endpos0
Categoryovum/regex

Inputs (6)

NameTypeDefaultDescription
patternSTRINGThe regular expression pattern.
stringSTRINGThe string to search. Used if `string_in` is not connected.
string_inoptSTRINGInput string or list of strings. Overrides `string` widget if connected.
flagsoptRE_FLAGS2Regex compilation flags.
posoptINT0The starting index for the search.
endposoptINT0The ending index for the search. If 0, searches to the end of the string.

Outputs (1)

NameTypeDescription
matchRE_MATCH