Can anyone of you provide me the regex to extract data for following string?
Dear Team,
Below are the sales details for Aug’23.
Sales for 24.08.2023.
CB Business
Description
For Today
For the month
YTD Last day
Turnover (Cr)
0.41
31.75
31.34
Volume (MT)
64.38
1,595.330
1,530.95
Regards,
XYZ
Expected output:
Description
For Today
For the month
YTD Last day
Turnover (Cr)
0.41
31.75
31.34
Volume (MT)
64.38
1,595.330
1,530.95
Store the Input data in a String variable called Input
- Assign -> Output = System.Text.RegularExpressions.Regex.Match(Input,"Description[\s\S]+(?=Regards)").Value
Actually, I don’t want to extract the data based on the second phrase, which is “Regards”; I want to take the data after the description until the last number, after which the data will be dynamic.
Store the Input data in a String variable called Input
- Assign -> Output = System.Text.RegularExpressions.Regex.Match(Input,"Description[\s\S]+\d+").Value