Read and Review Automation Anywhere Documentation

Automation 360

Close Contents

Contents

Open Contents

Using the Extract text action

  • Updated: 11/17/2020
    • Automation 360 v.x
    • Build
    • RPA Workspace

Using the Extract text action

Use the Extract text action to extract a range of text using logical operators from the source string.

To extract a substring from the specified source string, do the following:

Procedure

  1. In the Actions palette, double-click or drag the Extract text action from the String package.
  2. In the Source string field, specify the source string.
  3. Specify the text to extract by selecting from the following options:
    OptionSteps
    Before Extracts the entire text followed by the value that you have provided in the Start after text field.
    1. In the Start after text field, enter a string to use as the starting point.
    2. In the Occurrence field, enter a value to specify the number of occurrences.

      For example, if the source string is This is a test string which is used to extract specific sub-string and you want to extract the entire text after This. To extract the required text, you must enter This in the Start after text field and 1 in the Occurrence field. This indicates to the system to extract the text that is available after the first occurrence of This in the source string.

    Before and/or after Extracts the text between the values provided in the Start after text and the End before text fields.
    1. In the Start after text field, enter a string to use as the starting point.
    2. In the OR or AND field, select one of the options:
      • OR: Select to extract text if either of the values specified in the Start after text or the End before text field are available in the source string.
      • AND: Select to extract text if both the values specified in the Start after text and the End before text fields are available in the source string.
    3. In the End before text field, specify a string to use as the endpoint for extracting the text.
    4. In the Occurrence field, enter a value to specify the number of occurrences of the string you have provided in the End before text field.

      For example, if the source string is This is a test string which is used to extract specific substring and you want to extract the entire text before specific. To extract the required text, you must enter specific in the End before text field and 1 in the Occurrence field. This indicates to the system to extract the text available before the first occurrence of specific in the source string.

    After Extracts the entire text preceding the value you have provided in the End before text field.
    1. In the End before text field, specify a string to use as the endpoint for extracting the text.
    2. In the Occurrence field, enter a value to specify the number of occurrences of the string you have provided in the End before text field.

      For example, if the source string is This is a test string which is used to extract specific substring and you want to extract the entire text before specific. To extract the required text, you must enter specific in the End before text field and 1 in the Occurrence field. This indicates to the system to extract the text available before the first occurrence of specific in the source string.

  4. In the If no match found, return field, select one of the options:
    • Source String: Return the source string.
    • Empty (null) String: Return the null string if no match is found.
  5. In the Number of characters to get field, select one of the options:
    • All: Extracts all characters from the source string.
    • Only: Specify the number of characters to extract from the source string.
  6. In the Trim the extracted text (remove blank spaces) check box, select to remove blank spaces from the extracted text.
  7. In the Remove Enter from the extracted text check box, select to remove carriage returns from the extracted text.
  8. In the Assign the output to variable list, specify the variable.
  9. Click Save.
Send Feedback