transformations:regexp
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| transformations:regexp [2018/08/15 14:59] – created dmitry | transformations:regexp [2025/01/19 23:51] (current) – [Example #1] craigt | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Regular expression | + | {{ transformations: |
| + | ======REGULAR EXPRESSION====== | ||
| + | Category: Transform / Advanced \\ | ||
| - | This action creates a column with values that match a pattern specified using a [[https:// | + | \\ |
| + | =====Description===== | ||
| + | This action creates a column with values that match a pattern specified using a [[https:// | ||
| - | **Modes** | + | \\ |
| + | =====Use cases===== | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | *RegEx can be used to replace a pattern of characters with another value or pattern.\\ | ||
| - | | + | \\ |
| - | *//All matches// | + | =====Action settings===== |
| + | ^Setting^Description^ | ||
| + | |Source column|Select the column to evaluate the values in.| | ||
| + | |Regular expression< | ||
| + | |Case insensitive|When checked, text case is not taken into account when evaluating matches. | ||
| + | |New column name|Enter the name of the new column that will hold the match results. | ||
| + | |Mode|Select whether to return the first match only or all matches. | ||
| + | |If not matched|Select what value is returned when a match is not made. Options: | ||
| + | \\ | ||
| + | ====Mode options==== | ||
| + | ^Option | ||
| + | |First match only|Only the first match to the pattern will be returned. | | ||
| + | |All matches | ||
| + | |Capture mode |This option appears when //All matches// (above) is selected. | ||
| - | ===Example=== | + | \\ |
| + | =====Remarks===== | ||
| + | EasyMorph uses the [[https:// | ||
| - | Table: | + | While most " |
| + | |||
| + | RegEx can be set to detect one or more occurrences of the search pattern within a given value.\\ | ||
| + | |||
| + | \\ | ||
| + | =====Examples===== | ||
| + | |||
| + | ====Example #1==== | ||
| + | >Find phone numbers that match pattern '' | ||
| + | |||
| + | ===Before | ||
| ^Phone number ^ | ^Phone number ^ | ||
| | 1234567890 | | 1234567890 | ||
| Line 18: | Line 53: | ||
| | (123)4567890 | | (123)4567890 | ||
| - | Goal: find phone numbers that match pattern '' | + | ===After |
| - | Solution: Use regular expression '' | + | |
| - | + | ||
| - | Table: After | + | |
| ^Phone number | ^Phone number | ||
| | 1234567890 | | 1234567890 | ||
| - | | (123)456-7890 |(123)456-7890 | | + | | (123)456-7890 |**(123)456-7890** | |
| | 123-4567890 | | 123-4567890 | ||
| | 123-456-7890 | | 123-456-7890 | ||
| - | | (123)4567890 | + | | (999)888-7777 |
| + | |||
| + | ===Action parameters=== | ||
| + | > Source column: Phone number | ||
| + | > Regular expression: '' | ||
| + | > New column name: Matches | ||
| + | > Mode: First match only | ||
| + | > If not matched: Make empty | ||
| + | |||
| + | \\ | ||
| + | =====See also===== | ||
| + | |||
| + | * [[transformations: | ||
| + | * [[syntax: | ||
| + | * [[syntax: | ||
| + | * [[syntax: | ||
| + | |||
transformations/regexp.1534359552.txt.gz · Last modified: by dmitry