Text Match Value:
The 1hew_text_match_value node is designed to facilitate the extraction of values from a multiline text input based on a specified single-line text query. This node is particularly useful when you need to match a key within a structured text and retrieve its corresponding value. It operates by normalizing both the query and the keys in the multiline text to ensure case-insensitive matching. If an exact match is not found, it attempts to find a key that starts with the query, providing flexibility in text matching. This functionality is beneficial for AI artists who need to parse and extract specific data from formatted text inputs, enhancing the efficiency of data retrieval processes.
Text Match Value Input Parameters:
text_multiline
This parameter accepts a multiline string input, which is the source text containing key-value pairs. Each line in this text is expected to represent a mapping between a key and a value, typically separated by a colon or similar delimiter. The function of this parameter is to provide the data set from which the node will attempt to extract a value based on the query provided in the text_single parameter. There are no explicit minimum or maximum values, but the text should be formatted correctly to ensure accurate parsing.
text_single
This parameter takes a single-line string input, which serves as the query for matching against the keys in the text_multiline input. The node uses this query to search for a corresponding key in the multiline text, aiming to retrieve the associated value. The impact of this parameter is crucial as it determines the key that the node will attempt to match. There are no specific constraints on the length or content of this input, but it should be a valid string that represents the key you are interested in.
Text Match Value Output Parameters:
value
The output parameter value represents the extracted value corresponding to the matched key from the text_multiline input. If a match is found, this output will contain the value associated with the key; otherwise, it will return an empty string. This output is significant as it provides the result of the node's operation, allowing you to retrieve specific data from a structured text input efficiently.
Text Match Value Usage Tips:
- Ensure that the
text_multilineinput is well-formatted with clear key-value pairs separated by a colon or similar delimiter to facilitate accurate parsing and matching. - Use the
text_singleinput to specify the exact key you are interested in. If you are unsure of the exact key, provide a partial key to leverage the node's ability to match keys that start with the query.
Text Match Value Common Errors and Solutions:
text_match_value error: <error_message>
- Explanation: This error occurs when there is an issue during the execution of the node, possibly due to improperly formatted input text or an unexpected condition in the parsing logic.
- Solution: Verify that the
text_multilineinput is correctly formatted with key-value pairs and that thetext_singleinput is a valid string. Ensure there are no syntax errors or unexpected characters in the input text that could disrupt the parsing process.
