How to extract all the numbers(1018751952 1018741953 1018867777 ) of length 10 starting with 1018 in mail body of outlook?

thanks :slight_smile:

@anjasing - try this regex pattern…

For how to use Regex and Regex loops please check this post…

@prasath17 Can you please elaborate with using activity and variable detail? I am facing issue.

@anjasing - Could you please post a screenshot of what you have tried and the error? we will take it from there…

Hey @anjasing

Steps:

  1. After reading your email body - output to the String Varibale.
  2. Use Assign Statement
    var Str = System.Text.RegularExpression.Regex.Match(Str,“1018\d{1,4}”).ToString

Br,
Goutham

Hi @prasath17, it’s giving only one value not all three. Mail body is " your orders. 1018751952 1018741953 1018867777 Please check and confirm the same, Thanks". I want every value starting with 1018


@anjasing - You have to loop the Regex output variable in For each loop as shown below to get all the items(Sample below…ignore the groups)

Please give it a try and let us know if you get struck please let us know…

Thank you so much @prasath17 . It worked. :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.