transformations:regexp
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionNext revision | |||
— | transformations:regexp [2021/04/24 23:21] – craigt | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{ transformations: | ||
+ | ======REGULAR EXPRESSION====== | ||
+ | Category: Transform / Advanced \\ | ||
+ | |||
+ | \\ | ||
+ | =====Description===== | ||
+ | This action creates a column with values that match a pattern specified using a [[https:// | ||
+ | |||
+ | \\ | ||
+ | =====Use cases===== | ||
+ | A Regular Expression (" | ||
+ | |||
+ | Confirm the existence of values in a strict, predetermined format: | ||
+ | |||
+ | Validate that values fall within specific formatting parameters, e.g., a specific number of letters, numbers, and symbols in a required order. | ||
+ | |||
+ | Check for alternate spellings of keywords, e.g., " | ||
+ | |||
+ | RegEx can be used to replace a pattern of characters with another value or pattern.\\ | ||
+ | |||
+ | |||
+ | \\ | ||
+ | =====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 (may create new lines)|All matches found will be returned. | ||
+ | |Capture mode |This option appears when //All matches// (above) is selected. | ||
+ | |||
+ | \\ | ||
+ | =====Remarks===== | ||
+ | While most " | ||
+ | |||
+ | RegEx can be set to detect one or more occurrences of the search pattern within a given value.\\ | ||
+ | |||
+ | \\ | ||
+ | =====Examples===== | ||
+ | **Objective: | ||
+ | |||
+ | **Source table:** | ||
+ | ^Phone number ^ | ||
+ | | 1234567890 | ||
+ | | (123)456-7890 | | ||
+ | | 123-4567890 | ||
+ | | 123-456-7890 | ||
+ | | (123)4567890 | ||
+ | \\ | ||
+ | **Action parameters: | ||
+ | > Source column is "Phone number" | ||
+ | > Regular expression is '' | ||
+ | > New column name is " | ||
+ | > Mode is "First match only" | ||
+ | > If not matched "Make empty" | ||
+ | |||
+ | |||
+ | \\ | ||
+ | **Result:** | ||
+ | ^Phone number | ||
+ | | 1234567890 | ||
+ | | (123)456-7890 |(123)456-7890 | | ||
+ | | 123-4567890 | ||
+ | | 123-456-7890 | ||
+ | | (123)4567890 | ||
+ | |||
+ | \\ | ||
+ | =====See also===== | ||
+ | |||
+ | * [[transformations: | ||
+ | * [[syntax: | ||
+ | * [[syntax: | ||
+ | * [[syntax: | ||
+ | |||
+ | |||
transformations/regexp.txt · Last modified: 2021/07/19 02:22 by craigt