User Tools

Site Tools


transformations:regexp
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Next revision
transformations:regexp [2018/08/15 14:59] – created dmitry
Line 1: Line 1:
 +===== Regular expression =====
 +
 +This action creates a column with values that match a pattern specified using a [[https://en.wikipedia.org/wiki/Regular_expression|regular expression]].
 +
 +**Modes**
 +
 +  *//First match only// - for each value find only it's first match (if any). Ignore other matches.
 +  *//All matches// - for each value find all possible matches. If there is more than 1 match then insert additional row(s) into the resulting dataset.
 +
 +===Example===
 +
 +Table: Before
 +^Phone number ^
 +| 1234567890    |
 +| (123)456-7890 |
 +| 123-4567890   |
 +| 123-456-7890  |
 +| (123)4567890  |
 +
 +Goal: find phone numbers that match pattern ''(XXX)XXX-XXXX'' where X is any number.
 +Solution: Use regular expression ''^\(\d{3}\)\d{3}-\d{4}''. If not matched make empty.
 +
 +Table: After
 +^Phone number   ^ Matches  ^
 +| 1234567890    |  |
 +| (123)456-7890 |(123)456-7890 |
 +| 123-4567890    |
 +| 123-456-7890  |  |
 +| (123)4567890  |  |
  
transformations/regexp.txt · Last modified: 2021/07/19 02:22 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki