Visit ComfyUI Online for ready-to-use ComfyUI environment
Powerful utility for pattern recognition and validation in text data using regular expressions, enabling complex string matching operations with ease.
The RegexMatch
node is a powerful utility designed to help you determine if a specific pattern exists within a given string using regular expressions. This node is particularly useful for tasks that require pattern recognition or validation within text data. By leveraging the capabilities of regular expressions, RegexMatch
allows you to perform complex string matching operations with ease. Whether you're looking to validate input formats, search for specific text patterns, or filter data based on certain criteria, this node provides a flexible and efficient solution. Its ability to handle case sensitivity, multiline text, and special character matching makes it a versatile tool in any text processing workflow.
The string
parameter is the text input where the regular expression will be applied. It can be a single line or multiline text, depending on your needs. This parameter is crucial as it serves as the source data for pattern matching. There are no specific minimum or maximum values, but the text should be provided in a format that the node can process.
The regex_pattern
parameter is the regular expression pattern you want to search for within the provided string. This pattern defines the criteria for matching text and can include various regular expression syntax elements to specify complex search conditions. Like the string
parameter, it can also be multiline. There are no specific minimum or maximum values, but the pattern should be a valid regular expression.
The case_insensitive
parameter is a boolean option that determines whether the regular expression matching should ignore case differences. If set to True
, the matching process will not differentiate between uppercase and lowercase letters, making it useful for case-insensitive searches. The default value is True
.
The multiline
parameter is a boolean option that affects how the regular expression treats the input string. When set to True
, the ^
and $
anchors will match the start and end of each line, respectively, rather than the start and end of the entire string. This is particularly useful when working with multiline text. The default value is False
.
The dotall
parameter is a boolean option that changes the behavior of the dot (.
) in the regular expression pattern. When set to True
, the dot will match all characters, including newline characters, which is useful for matching patterns across multiple lines. The default value is False
.
The matches
output parameter is a boolean value that indicates whether the regular expression pattern was found in the input string. If the pattern is found, the output will be True
; otherwise, it will be False
. This output is essential for determining the presence or absence of the specified pattern in the text.
case_insensitive
parameter to perform searches that are not affected by letter casing, which can be particularly useful when dealing with user input that may vary in capitalization.multiline
and dotall
options when working with text that spans multiple lines, allowing for more flexible pattern matching across line breaks.regex_pattern
provided is not a valid regular expression.regex_pattern
accurately represents the text you are trying to match and consider adjusting the case_insensitive
, multiline
, or dotall
parameters if necessary.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.