strinput= "Amount: $10
Name: May Ng (value of name changes)
Valid till: 31 Dec 2023 (value of date changes)
Country: Singapore"
stroutput= System.Text.RegularExpressions.Regex.Matches(strinput,"(Amount:\s+|Country:\s+).+")
DataType of stroutput: IEnumerable(System.Text.RegularExpressions.Match)
=> Run a For each loop for the stroutput to get the values.
The above expression extract line which starts with either of keywords.
If you want to extract line which contains either of keywords, can you try to replace StartsWith with Contains in the above expression?