I need to fetch Unread Emails and need to extract some values.
The Body of Emails will be :
Standard Purchase Order 453635467
I need to fetch “453635467” (Standard Purchase Order) and 345265 (ID)
strPurOrder = 453635467
strID = 345265
Any help or suggestion would be appreciated.
to get purchase order:
purchaseOrder = System.Text.RegularExpressions.Regex.Match(txt, "Purchase Order[\s]+([\d]+)").Groups(1).Value
to get ID
ID = System.Text.RegularExpressions.Regex.Match(txt, "(?s)ID[\s]+([\d]+)").Groups(1).Value
where txt is the variable containing email Body
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.