String Operation command

Use the String Operation command to manipulate text strings or extract part of a string and store it in a variable.


The String Operations command is used for capturing then manipulating text strings, or extracting a portion of a text block from an email, a website, or an application window. The command enables users to search the string for particular phrases, compare two strings, convert a string to upper or lowercase, or obtain the length of a string. The resulting elements are stored in a list variable.

To learn more, search for the Automating String Operations: Methods to Manipulate and Extract Strings and Automating Tasks Using the String Operation Command courses in Automation Anywhere University: RPA Training and Certification (A-People login required).

Specifies a range of text to extract using logical operators.
  • Specify the Source String.
  • Use the Before and After text fields, and Logical Operators to refine the command:
    • AND: ensures the Before and the After conditions are met.
    • OR (default): ensures either the Before or After condition is met.
  • Type the number of characters to extract in the text field.
  • Optional: mark the Trim check box to remove blank spaces from the extracted text.
  • Optional: mark the Remove Enter check box to remove paragraph spacing from the extracted text.
  • Select either the Source string or the Empty string radio button to specify the return action if no match is found.
  • Assign the output to a Variable.
Compares two strings and returns value of True or False.
  • Specify String1 and String2.
  • Refine the search by selecting the Match Case checkbox.
  • Assign the output to a Variable.
Locates a substring that exists within the source string.
  • Match Case: Select this check box to refine the scope.
  • Regular Expression: Select this check box if the Find field contains a regular expression. For example, to find all email addresses in the source, specify the following as a regular expression: \b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b
Joins all separate elements of list variables by defining the source string and a delimiter.
Obtains the length of the string by specifying the source string.
Lower Case
Converts a source string to lower case.
Replaces a portion of a source string with a specified replacement string.
  • Optional: specify the character position from which to begin.
  • Optional: the number of times it is to be replaced.
  • Select the Match Case check box to refine the scope.
  • Select the Regular Expression check box if the string contains a regular expression.
  • Assign the output to a Variable or the Clipboard.
Reverses a specified source string.
Splits a source string.
  • Specify the Source String.
  • Limit: Optional; specify a number of delimiters.
  • Match Case: Select this check box to refine the scope.
Retrieves a substring.
  • Specify the Source string.
  • Start From (minimum value = 1).
  • Optional: String Length (minimum value = 0).
  • Optional: Assign the output to a variable selected from the drop-down menu.
Trims blanks and spaces from a specified source string.
Upper Case
Converts a source string to upper case.