Regular Expressions (RegEx) in SEMINE are sequences of characters that define specific search patterns in text. They allow you to identify, extract, or replace parts of data withinvarious data fields and automation rules. By using RegEx, you can create advanced and precise matching patterns that enhance automation and data accuracy in SEMINE.
How SEMINE Uses RegEx
SEMINE makes use of Regular Expressions (RegEx) in two separate places:
-
Workflow conditions
The RegEx search method allows you to search for a pattern of characters to satisfy the condition criteria. Example:\d{5,}
finds at least five digits in a row before the workflow condition is fulfilled. -
Automation action: RegEx Matching
This automation action is useful for cleanup purposes and allows you to search for a pattern and replace the current value with the clean value. Example:\d+
with the /global flag enabled will find all digits in a field and can then replace or append the current content of that field or another target field.
RegEx in Workflow
When used as a search method, RegEx defines flexible conditions to check whether a field matches a pattern.
Examples
-
ABC
— Field contains the exact text “ABC” -
123
— Field contains the number “123” -
\d
— Field contains at least one digit -
\d{5,}
— Field contains at least five consecutive digits (e.g., ABC12345) -
^[A-Za-z]{2}\d{6,8}$
— Field starts with two letters followed by 6–8 numbers (e.g., AB123456)
See also: Explore how workflows are created in SEMINE
Automation Action: RegEx Matching
The RegEx Matching automation action allows you to extract or replace text based on a pattern. You can choose to either replace the field value or append (suffix) the match, and write the result to the same field or a different target field.
The RegEx /global flag
Suppose your field contains ABC123DEF456
and you use the pattern \d+
:
-
Global flag disabled: Only the first match is returned. Result:
123
-
Global flag enabled: All matches are returned. Result:
123
and456
/global
(/g
) flag can be enabled or disabled. When enabled, all matches are captured; when disabled, only the first match is captured.See also: Setting up automations in SEMINE
Automation Action: More Examples with the Global Flag (/g)
Example 1: Extract all numbers
Field value: ABC123DEF456GHI789
RegEx pattern: \d+
123456789
All numbers in the field are captured because the global flag finds all matches.
Example 2: Extract all uppercase letters
Field value: AbCDeFG123
RegEx pattern: [A-Z]
ACDFG
All uppercase letters in the text are captured.
Example 3: Extract multiple email addresses
Field value: user1@test.com some other text
RegEx pattern: [a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}
user1@test.com
The email address in the field is captured.
Example 4: Extract all dates in DD/MM/YYYY format
Field value: Invoice date: 12/03/2025
RegEx pattern: \d{2}/\d{2}/\d{4}
12/03/2025
All dates in the text are captured.
Comments
0 comments
Article is closed for comments.