Split
AI-generatedOverview
This node performs a 'Split' operation on input text using a specified regular expression pattern and flags. It splits the input text into parts based on the regex pattern, which is useful for parsing and segmenting unstructured text data such as logs, emails, or scraped web content. For example, it can split a paragraph into sentences or separate log entries by a delimiter pattern.
Use Case Examples
- Splitting a CSV string into individual values using a comma regex pattern.
- Splitting a paragraph into sentences using a regex pattern for sentence boundaries.
Properties
| Name | Meaning |
|---|---|
| Input Text | The text to process and split using the regex pattern. |
| Regex Pattern | The regular expression pattern used to split the input text. |
| Regex Flags | Flags for the regular expression, such as 'g' for global matching, 'i' for case-insensitive, or 'm' for multiline. |
Output
JSON
result- The result of the split operation, typically an array of strings obtained by splitting the input text using the regex pattern.
Dependencies
- An API key credential for the external customJs API service used to perform the regex operations.
Troubleshooting
- Ensure the regex pattern is valid and correctly formatted; invalid patterns may cause errors.
- Check that the API key credential is correctly configured and has access to the external service.
- If the node fails, verify the input text is a string and not empty when required.
Links
- JavaScript Regular Expressions - Reference for regex syntax and usage in JavaScript.