Regex
Last updated
Was this helpful?
Last updated
Was this helpful?
This operation allows you to extract or manipulate parts of your input strings that match a specific regular expression pattern.
These are the input/output expected data types for this operation:
- The strings from which you want to pull out specific parts.
- The resulting strings that match your regular expression. The output data is represented as a list of strings.
Note that the output data of this operation is a list of strings. Currently, Onum differentiates between string
and listString
, so you won't be able to use this data type in other operations that require strings as input data type.
These are the parameters you need to configure to use this operation (mandatory parameters are marked with a *):
Suppose you want to look for email addresses in your input strings:
In your Pipeline, open the required Action configuration and select the input Field.
In the Operation field, choose Regex.
Set Regex to [a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,}
Give your Output field a name and click Save.
Entering the parameters set above, for the following text:
you'll get the following result:
You can try out operations with specific values using the Input field above the operation. You can enter the value in the example above and check the result in the Output field.