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 r079

...

Excerpt

Returns true if the rightmost set of characters of a column of values matches a pattern. The source value can be any data type, and the pattern can be a

d-s-itemlang
itempattern
rtrue
, regular expression, or a string.

...

Output: Returns true if last letter of the tweets column value is "?". 

d-s-itemlang
itempattern
  example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextderive type:single value:endswith(tweets,`{hashtag}{1,9}`) as:'hasHashtag'

endswith(tweets,`{hashtag}{1,9}`)

Output: Returns true if the tweets column ends with 1-9 hashtag values. Otherwise, the returned value is false.

Regular expression pattern exampleexpression example:

D lang syntax
RawWrangletrue
Typeref
showNotetrue
WrangleTextset col:Status value:if(endswith,myNum,/([01][0-9][0-9]|2[0-4][0-9]|25[0-5])/),'myNum - valid','myNum - error')

if(endswith,myNum,/([01][0-9][0-9]|2[0-4][0-9]|25[0-5])/),'myNum - valid','myNum - error')

...