Visit ComfyUI Online for ready-to-use ComfyUI environment
Search for patterns in text, aiding text analysis with flexible matching options and case sensitivity consideration.
The DF_Search_In_Text node is designed to help you search for specific patterns within a given text. This node is particularly useful for tasks that require text analysis, such as finding keywords, validating text formats, or extracting specific information from a body of text. By leveraging either strict matching or regular expressions, this node provides flexibility in how patterns are identified. The node can also be configured to consider case sensitivity, making it adaptable to various text processing needs. Its primary goal is to streamline the process of text searching, making it efficient and straightforward for AI artists who may not have a deep technical background.
This parameter represents the body of text in which you want to search for a specific pattern. It is a string input where you can paste or type the text to be analyzed. The accuracy of the search results depends on the content of this text.
The pattern parameter is the string or regular expression you want to search for within the provided text. This can be a simple word, a phrase, or a more complex regular expression, depending on the mode selected. The pattern is crucial as it defines what you are looking for in the text.
This boolean parameter determines whether the search should be case-sensitive. If set to True
, the search will consider the case of the characters in both the text and the pattern. If set to False
, the search will be case-insensitive, treating uppercase and lowercase characters as equivalent. The default value is False
.
The mode parameter allows you to choose between two search methods: "Strict" and "RegEx". The "Strict" mode searches for exact matches of the pattern within the text, while the "RegEx" mode uses regular expressions to find more complex patterns. This parameter provides flexibility in how the search is conducted, depending on your specific needs.
This output parameter indicates whether the pattern was found in the text. It returns True
if the pattern is found at least once and False
if the pattern is not found. This boolean value helps you quickly determine the presence of the pattern in the text.
This output parameter provides the number of times the pattern was found in the text. It returns an integer value representing the count of occurrences. This information is useful for understanding the frequency of the pattern within the text.
ConsiderRegister
to True
if the case of the text is important for your search, such as distinguishing between "Apple" and "apple".ConsiderRegister
setting is correctly configured for your needs.© Copyright 2024 RunComfy. All Rights Reserved.