I have an automation where i am reading through emails and getting a number. Below is an example of what i have to work with. Any idea how i would write the regular expression to pull the data after the : ?
- Equipment Serial Number: T27733333
- Equipment Serial Number: 09565
- Equipment Serial Number: T8992334
- Equipment Serial Number: HJYU678
Here is my code that im using now but its not pulling the number.
System.Text.RegularExpressions.Regex.Match(strBody,“(?<=Equipment Serial Number:?).*(?<= ‘/s’ )”).Value
You have use Matches activity as shown below…
StrCollection = System.Text.RegularExpressions.Regex.Matches("YourString","(?<=Equipment Serial Number:\s+)\w+")
Here StrCollection is of type MatchCollection
Then Use the strCollection in the for each to loop the values…
As always Nice Work and thank you!!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.