This API endpoint allows you to extract specific patterns from a text using multiple regular expressions. It returns the matches found in the text based on the specified regular expression patterns.
Endpoint Information
- Method: POST
- Endpoint URL: https://node.nodetrigger.com/api/multiple_regex
- Content Type: application/json
Example Requests
To use this API endpoint, you need to send a POST request including a JSON body with the text and the regular expression patterns you want to apply. Below is an example of how you can structure your JSON request:
{
"string": "Hello, my email is example@test.com and my website is https://example.com.",
"regexPatterns": [
"email::single::/(\\S+@\\S+\\.\\S+)/",
"urls::multiple::/(https?:\\/\\/\\S+)/"
]
}
Notes
- The request JSON should include a “string” key containing the text to search, and a “regexPatterns” key which is a list of regular expression patterns.
- Each pattern should be structured as “key::type::/regex/” where:
- key: A label for the identified matches.
- type: Can be either “single” for the first match or “multiple” for all matches.
- regex: The regular expression pattern enclosed in slashes.
- If a pattern is not specified correctly or does not match, the result for that pattern will be
null
. - Ensure your regular expressions are correctly formatted and do not include leading or trailing slashes outside of the pattern structure.
API calls are made to https://node.nodetrigger.com/api/multiple_regex.
“`