Hi Team,
I want to extract specific value from below example. Please find below example,
Ex:- "Your request HU00070GJFJ780000FGF7 has been added on the watchlist.
Which regex should i use to extract highlighted value? Help me.
Hi Team,
I want to extract specific value from below example. Please find below example,
Ex:- "Your request HU00070GJFJ780000FGF7 has been added on the watchlist.
Which regex should i use to extract highlighted value? Help me.
[A-Z]+\d+[A-Z\d]+
System.Text.RegularExpressions.Regex.Match(Var1,"[A-Z]+\d+[A-Z\d]+").Value
@Smitesh_Aher2
Use this,
HU\d{5}[A-Z]{4}\d{6}[A-Z]{3}
(?<=Your request )[A-Z0-9]+
System.Text.RegularExpressions.Regex.Match(Input,"(?<=Your request )[A-Z0-9]+").Value
Regards,
You can also use the String Manipulations if your data will be same and the highlited code changes everytime. Then you can follow the below expression,
- Assign -> Input = "Your request HU00070GJFJ780000FGF7 has been added on the watchlist."
- Assign -> Output = Input.Split(" ")(2).Split(" ").First
Check the below workflow for better understanding,
Hope it helps!!
Thanks Team for your response. But for below example which expression should i use?
Ex:- "Your request HU00070GJFJ780000FGF7 has been added on the watchlist.
Ex:- "Your request of the this id G00070GJFJ780000FGF7 is added on the watchlist.
Ex:- "Your request 8800070GJFJ780000FGF7 has been added on the watchlist.
(?<=Your\s?request.*)[A-Z0-9]+
System.Text.RegularExpressions.Regex.Match(Input,"(?<=Your\s?request.*)[A-Z0-9]+").Value
Regards,
[A-Z]+\d+[A-Z\d]+
You got one line at a time then you use Match activity which is a string datatype
System.Text.RegularExpressions.Regex.Match(Var1,"[A-Z]+\d+[A-Z\d]+").Value
If you have multiple matches then use Find Matching Patterns Activity and this activity output is IEnumerable Of matches and it is a collection
All the 3 lines will come at same time or each line will come each time… @Smitesh_Aher2
Could you be more specific.
hie @Smitesh_Aher2 here your input
Okay @Smitesh_Aher2
You can try the below regular expression to extract the highlited text from Input data,
[A-Za-z0-9]+[A-Z0-9]+
This will extract the required data properly.
- Assign -> Input = "Your request 8800070GJFJ780000FGF7 has been added on the watchlist."
- Assign -> Output = System.Text.RegularExpressions.Regex.Match(Input.toString, "[A-Za-z0-9]+[A-Z0-9]+")
Check the output in immediate for better understanding,
Hope it helps!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.