Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version r0712

D toc

For a number of different transform types, you can specify the limits at which any match is valid for a text string. In the diagram below, you can see how six different positional identifiers can be applied to pattern matching:

Info

NOTE: Depending on the type of transform, some of these clauses are not available.

Positioning

 

D caption
typefigure
Pattern Clause Positioning

after

Identifies pattern or string after which the match is evaluated.

Example transformation:

D trans
RawWrangletrue
p03Value'eat '
Typestep
WrangleTextextract type: on col: MySentence start: 'eat '
p01NameColumn
p01ValueMySentence
p02NameOption
p02ValueOn pattern
p03NameAfter pattern
SearchTermExtract text or pattern

Extracts:

Code Block
pizza on Fridays with my friends."

from

Identifies pattern or string from which the match is evaluated. Any match includes the from clause pattern or string.

Example transformation:

D trans
RawWrangletrue
p03Value'eat '
Typestep
WrangleTextextract type: between col: MySentence start: 'eat ' includeStart: true
p01NameColumn
p01ValueMySentence
p02NameOption
p02ValueBetween two parameters
p03NameAfter pattern
p04Valuetrue
p04NameInclude as part of match
SearchTermExtract text or pattern

Extracts:

Code Block
eat pizza on Fridays with my friends."


before

Identifies pattern or string before which the match is evaluated.

Example transformation:

D trans
RawWrangletrue
p03Value'friends'
Typestep
WrangleTextextract type: on col: MySentence end: 'friends'
p01NameColumn
p01ValueMySentence
p02NameOption
p02ValueOn pattern
p03NameBefore pattern
SearchTermExtract text or pattern

Extracts:

Code Block
"I like to eat pizza on Fridays with my


to

Identifies pattern or string up to which the match is evaluated. Any match includes the to clause pattern or string.

Example transformation:

D trans
RawWrangletrue
p03Value'friends'
Typestep
WrangleTextextract type: between col: MySentence end: 'friends' includeEnd: true
p01NameColumn
p01ValueMySentence
p02NameOption
p02ValueBetween two patterns
p03NameBefore pattern
p04Valuetrue
p04NameInclude as part of match
SearchTermExtract text or pattern

Extracts:

Code Block
"I like to eat pizza on Fridays with my friends


on

Identifies pattern or string in which the match may be found.

Example transformation:

D trans
RawWrangletrue
p03Value'Fridays'
Typestep
WrangleTextextract type: on col: MySentence on: 'Fridays'
p01NameColumn
p01ValueMySentence
p02NameOption
p02ValueOn pattern
p03NameMatch pattern
SearchTermExtract text or pattern

Extracts:

Code Block
Fridays


at

Identifies the index of starting (x) and ending (y) characters in the string to match. In the above example, at:2,6 matches the string like.

Example transformation:

D trans
RawWrangletrue
p03Value2,6
Typestep
WrangleTextextract type: at col: MySentence at: 2,6
p01NameColumn
p01ValueMySentence
p02NameOption
p02ValueBetween two positions
p03NamePositions
SearchTermExtract text or pattern

Extracts:

Code Block
like

Pattern Parameter Interactions

The following table identifies the pattern parameters that can be matched with the parameter in the left column. 

Info

NOTE: The at parameter does not interact with any of the listed parameters.

Parameterafterfrombeforetoon
afterSee Note 1.No.before or tobefore or toYes. Can include before.
fromNo.See Note 1.before or tobefore or toNo.
beforeafter or fromafter or fromSee Note 1.No.Yes. Can include after.
toafter or fromafter or fromNo.See Note 1.No.
onYes. Can include before.No.Yes. Can include after.No. 
  • Note 1: If there is no other pattern parameter in the transform, the maximum number of matches per cell is 1. If there is a matching parameter, more matches per cell can be found.