Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
input_string [COLOR=#804040][b]=[/b][/color] [COLOR=#ff00ff]'aDD!cli_ver!aTT!cli_org'[/color]
[COLOR=#804040][b]say[/b][/color] [COLOR=#ff00ff]"original string = '"[/color][COLOR=#804040][b]||[/b][/color]input_string[COLOR=#804040][b]||[/b][/color][COLOR=#ff00ff]"'"[/color]
[COLOR=#0000ff]/* replace characters 'a' and '!' with spaces */[/color]
str[COLOR=#804040][b]=[/b][/color][COLOR=#008080]translate([/color]input_string[COLOR=#804040][b],[/b][/color][COLOR=#ff00ff]' '[/color][COLOR=#804040][b],[/b][/color][COLOR=#ff00ff]'!a'[/color][COLOR=#008080])[/color]
[COLOR=#804040][b]say[/b][/color] [COLOR=#ff00ff]"modified string = '"[/color][COLOR=#804040][b]||[/b][/color]str[COLOR=#804040][b]||[/b][/color][COLOR=#ff00ff]"'"[/color]
[COLOR=#0000ff]/* compute number of words */[/color]
nr_words [COLOR=#804040][b]=[/b][/color] [COLOR=#008080]words([/color]str[COLOR=#008080])[/color]
[COLOR=#804040][b]say[/b][/color] [COLOR=#ff00ff]"modified string consists of"[/color] nr_words [COLOR=#ff00ff]"words"[/color]
[COLOR=#0000ff]/* extract words to stem */[/color]
words_stem.0 [COLOR=#804040][b]=[/b][/color] nr_words
[COLOR=#804040][b]do[/b][/color] j[COLOR=#804040][b]=[/b][/color]1[COLOR=#804040][b] to [/b][/color]words_stem.0
words_stem.j [COLOR=#804040][b]=[/b][/color] [COLOR=#008080]word([/color]str[COLOR=#804040][b],[/b][/color]j[COLOR=#008080])[/color]
[COLOR=#804040][b]end[/b][/color]
[COLOR=#0000ff]/* list the words found */[/color]
[COLOR=#804040][b]do[/b][/color] j[COLOR=#804040][b]=[/b][/color]1[COLOR=#804040][b] to [/b][/color]words_stem.0
[COLOR=#804040][b]say[/b][/color] [COLOR=#ff00ff]"word"[/color][COLOR=#804040][b]||[/b][/color][COLOR=#008080]right([/color]j[COLOR=#804040][b],[/b][/color]2[COLOR=#804040][b],[/b][/color]0[COLOR=#008080])[/color][COLOR=#804040][b]||[/b][/color][COLOR=#ff00ff]" = '"[/color][COLOR=#804040][b]||[/b][/color]words_stem.j[COLOR=#804040][b]||[/b][/color][COLOR=#ff00ff]"'"[/color]
[COLOR=#804040][b]end[/b][/color]
[COLOR=#804040][b]exit[/b][/color]
$ rexx split.rex
original string = 'aDD!cli_ver!aTT!cli_org'
modified string = ' DD cli_ver TT cli_org'
modified string consists of 4 words
word01 = 'DD'
word02 = 'cli_ver'
word03 = 'TT'
word04 = 'cli_org'
input_string = 'aDD1!cli_ver1!aTT1!cli_org1a!DD2!cli_ver2!aTT2!cli_org2'
original string = 'aDD1!cli_ver1!aTT1!cli_org1a!DD2!cli_ver2!aTT2!cli_org2'
modified string = ' DD1 cli_ver1 TT1 cli_org1 DD2 cli_ver2 TT2 cli_org2'
modified string consists of 8 words
word01 = 'DD1'
word02 = 'cli_ver1'
word03 = 'TT1'
word04 = 'cli_org1'
word05 = 'DD2'
word06 = 'cli_ver2'
word07 = 'TT2'
word08 = 'cli_org2'