Regex Search and Match¶
Performs a regular expression search on input text and returns all matches as a list.
Quick Start¶
- Add the Regex Search and Match node to your workflow.
- Enter the text to search in the "text_input" field.
- Provide a valid regular expression in the "regex_pattern" field.
- Run the node to retrieve all matches.
Setup Guide¶
1. Add Node to Workflow¶
- Open your node editor.
- Drag the Regex Search and Match node into your workspace.
2. Configure Inputs¶
- Enter the text you want to search.
- Specify the regex pattern for matching.
Basic Usage¶
Extracting Words¶
- Find all words matching a specific pattern (e.g., all 6-letter words).
- Use for text analysis, validation, or extraction tasks.
Configuration¶
Required Inputs¶
Field | Description | Type | Example |
---|---|---|---|
text_input | The input text to search for matches | STRING | "Find all words here" |
regex_pattern | Regular expression pattern to match | STRING | "\b[a-zA-Z]{6}\b" |
Optional Inputs¶
None
Outputs¶
Field | Description | Example |
---|---|---|
matches | List of all regex matches found | ["search", "result"] |
Best Practices¶
Regex Construction¶
- Test your regex patterns before use.
- Use raw strings (prefix with r) to avoid escape issues.
Performance¶
- Use specific patterns to avoid excessive backtracking.
- Limit input size for large-scale searches.
Troubleshooting¶
Common Issues¶
- No matches found: Check your regex pattern and input text for correctness.
- Invalid regex error: Ensure your pattern is valid and properly escaped.
Need Help?¶
- Refer to Python's
re
module documentation for regex syntax and examples.