Get Subtext

Verb: getSubString

Gets a snippet of text based on Start index and Length .


getSubString --text(String) --start(Numeric) [--length(Numeric)] (String)=value


Script Designer Required AcceptedTypes Description
--text Original text Required Text Text where the subtext should be obtained from.
--start Start index Required Number Index that corresponds to the starting position for the Subtext.
--length Length Optional Number Number of characters Subtext should have, after Start index .


Script Designer AcceptedTypes Description
value Subtext Text The text snippet obtained from Original text .


Gets a 14 character snippet of text.

defVar --name textEntry --type String --value "IBM Robotic Process Automation. Leading the RPA market in Brazil!"
defVar --name subText --type String
// Get a 14-character excerpt from the input text.
getSubString --text "${textEntry}" --start 1 --length 14 subText=value
logMessage --message "${subText}" --type "Info"
// This example produces the following result:
// "IBM Robotic Pr.


All character types are included in Get Subtext, including numbers, special characters, spacing, and tabs.

See Also

  • Add Escape Characters to Regular Expression
  • Add Escape Characters to Text
  • Calculate Hash
  • Change Text Case
  • Check File
  • Concatenate Texts
  • Convert HTML to Text
  • Count Occurrences in Text
  • Count Text Characters
  • Create Random Text
  • Create Table By Regular Expression
  • Empty or Null Text Variable
  • Find by Regular Expression
  • Find Occurrences in Text
  • Format Text
  • Get Text from Regular Expression
  • HTML to Markdown
  • Insert New Line to Text
  • Join Text
  • Pad Text
  • Parse URI
  • Remove Diacritics
  • Remove Escape Characters
  • Replace Part of Text
  • Replace Text
  • Split Text
  • Trim Text Blanks