Articles → UIPATH → Matches Activity Of Regular Expression In Uipath

Matches Activity Of Regular Expression In Uipath






Purpose





Scenario




Picture showing the notepad with emails that needs to be read using the regular expression in Uipath

Click to Enlarge


Example




  1. Drag and drop the "Read Text File" activity to read the text file and assign the value to a string variable.
  2. Picture showing the Read Text File activity to read the text file in Uipath

    Click to Enlarge

  3. Drag and drop the "Matches" activity and click on the "Configure Regular Expression…" button.
  4. Picture showing the Configure Regular Expression to configure the regular expression in UiPath

    Click to Enlarge

  5. A window will appear to select the regular expression. For this example, we have selected "Email" as "Regex".
  6. Click on the "Save" button.
  7. Picture showing the Regex builder for creating the regular expression

    Click to Enlarge

  8. In the properties window of the "Matches" activity, specify the input string and the output variable.
  9. Picture showing the properties window of the matches activity to set the input data

    Click to Enlarge

  10. Loop through all the items in the "emailids" variable.
  11. Picture showing the for each loop to loop through all the emails in the variable

    Click to Enlarge

  12. Save and run the bot.

Output


Picture showing all the emails displayed in the output window of the Uipath studio

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Sunday, March 28, 2021

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250