Leggi e rivedi la documentazione di Automation Anywhere

Automation 360

Chiudi contenuti

Contenuti

Apri contenuti

Using Replace action

  • Aggiornato: 2022/07/13
    • Automation 360 v.x
    • Crea
    • Spazio di lavoro RPA

Using Replace action

Use the Replace action to find a piece of text from the source string and replace it with another text.

A regular expression is a sequence of characters that define a search pattern. For example, to find all email addresses in the source string, specify the following as a regular expression: \b[A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b.

Procedura

To replace text from the specified string, follow these steps:

  1. In the Actions palette, double-click or drag the Replace action from the String package.
  2. Nel campo Stringa sorgente, specifica la stringa sorgente.
  3. In the Find string field, specify the substring.
  4. In the When finding field, select one of the options:
    • Caso di corrispondenza: Matches the case of the text.
    • Caso di non corrispondenza: Does not match the case of the text.
  5. In the The "find string" is field, select one of the options:
    • A regular expression: The substring is a regular expression
    • Not a regular expression: The substring is not a regular expression.
  6. Opzionale: In the Start from field, specify the starting position.
    The action then starts from the value you specify in this field. For example, if you specify 5 in the Start from field for the source string "Big blue ocean", when the bot runs, the action ignores the four preceding characters ("Big", including the space character) and searches for the substring in "blue ocean".
  7. Opzionale: In the Count field, specify the number of times the found string must be replaced.
    For example, in the source string "Big blue ocean, blue fish, blue sky", you want to replace the first two instances of "blue" with "green". Enter 2 in the Count field, 5 in the Start from field, and green in the Replace with field. When the bot runs, the action produces the output green ocean, green fish, blue sky.
    Nota: By default, the value in the Count field is set to -1, which means that all the instances of the found string will be replaced.
  8. In the Replace with field, specify the text to replace the string.
  9. In the Assign the output to variable list, specify the variable that will hold the new string.
  10. Fai clic su Salva.
Invia feedback