Input sample : Balance $2,581,505.60
Output : $2,581,505.60
Current implementation : System.Text.RegularExpressions.Regex.Matches(“Balance $2,581,505.60”, “\d+(.\d+)*”)
Any help would be appreciated thanks.
Input sample : Balance $2,581,505.60
Output : $2,581,505.60
Current implementation : System.Text.RegularExpressions.Regex.Matches(“Balance $2,581,505.60”, “\d+(.\d+)*”)
Any help would be appreciated thanks.
Appreciated.
@Steven_McKeering Since there is only one ouput that I expect from the regex match , how do we directly get the value without looping on the output matches ? thanks.
I tried out_put(0).ToString but it gives an error objbject reference not set to an instance of an object
why do i get Throw: Error Occured :Object reference not set to an instance of an object.?
Throw: Error OccuredError Occured :Specified argument was out of the range of valid values.
Parameter name: i
Still the same , this is the sample output from the variable
Balance I
$2,581,505.60
i tried your regex on the regex build it does not highlight or even work @prasath17 @Steven_McKeering Thanks
@AhmedKutraphali - Test text is not the output…You completely messed up…I have already provided the Regex with Code…if you want Matches activity i can share a sample…
Try this format , thanks
Balance I
$2,581,505.60
the format above is multi line
@AhmedKutraphali - Main_1.xaml (6.6 KB) – Check this.
You initially gave one input , now your input is completely different . That’s why Regex had returned empty result. Please share the correct/Proper input so that we will give correct solution.
Hi,
I suppose the following is better in this case, FYI.
System.Text.RegularExpressions.Regex.Matches(yourString, "(?<=Balance[\s\S]*?)\$[.,\d]+")
Regards,
U can use
output_var.ElementAt(0).ToString
Where output_var is the output of regex matches
Regards
Nived N
Happy Automation
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.