@sharu_priya basically this regex is used to remove special character from your value so if the value changed it still working for you. so try it on with multiple values . this should take care of all formats.
" Freight Pickup: 232613 LTL Less-Than-Truckload (Dry Van) from Langley Township, BC to Sumner, WA Caller: Shipper: Consignee: Caller is the: Shipper Billing is: Prepaid (Shipper Will Pay) Payment by: CSA Shipping Account Company Name: Panefri North America Contact Name: ABC Phone: 0000000000 Associated CSA Quote Number: WQ3153682 Your Email: orders@panefri.commailto:orders@ABC.com Confirm Email: orders@ABC.com Company Name: ABC Contact Name:ABC”
This is the mail body.
So in any of the mail body wq… contains means i need to extract only that.
so that wq will be in different formats like i mentioned in the query.
Little tricky so please help me
I am using find matching pattern activities… in that text in search property this string will be there which is extracted from mail body.
So i have to give that pattern which extracts wq…
Does the mail body always contain 'Quote Number: ’ followed by the WQ/Q extraction you need? Then you could just use (?<=Quote Number:\s)[A-Za-z0-9]+ I think.
Yes, sorry you’re right. I’m not sure if there’s a regex way to do this. Maybe you need a extra step to remove the special characters. Hopefully someone else has the solution for you.
i invoked the below code…it says no match found though match is found
Invoke code:
’ Input String
Dim inputStri As String = “Freight Pickup: 232613 LTL Less-Than-Truckload (Dry Van) from Langley Township, BC to Sumner, WA Associated CSA Quote Number: Q315362 Your Email: orders@panefri.com”
’ Regex Pattern
Dim patte As String = “(?<=^W?Q)#\s/-”
’ Perform Match
Dim matchResult As String = “”
Dim match As System.Text.RegularExpressions.Match = System.Text.RegularExpressions.Regex.Match(inputStri, patte)
’ Check if a match is found
If match.Success Then
’ Combine “WQ” or “Q” with the digits
matchResult = match.Groups(1).Value.ToLower() & match.Groups(2).Value
Else
matchResult = “No match found”
End If
’ Assign the result back to UiPath variable
result = matchResult