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.
re.search (Regex Search)
- flags
- match
◄pattern►
◄string►
◄string_in—►
◄pos0►
◄endpos0►
Categoryovum/regex
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| pattern | STRING | The regular expression pattern. | |
| string | STRING | The string to search. Used if `string_in` is not connected. | |
| string_inopt | STRING | Input string or list of strings. Overrides `string` widget if connected. | |
| flagsopt | RE_FLAGS | 2 | Regex compilation flags. |
| posopt | INT | 0 | The starting index for the search. |
| endposopt | INT | 0 | The ending index for the search. If 0, searches to the end of the string. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| match | RE_MATCH | — |