Please help me on the regex

Hello everyone

I need to extract the value from the input string

Input - Data is private total - 54545.58
Output - 54545.58

Hi @Marian_B

Use Assign activity
LHS - Create an variable
RHS - System.Text.RegularExpressions.Regex.Match(“Input string”,“(?<=total\s-)\s+(\S+)”).Tostring.Trim

Regards
Gokul

1 Like

@Marian_B

Try below Regular expression.

 System.Text.RegularExpressions.Regex.Match(“Input string”,"\d+.\d+").Value
1 Like

Hi!

Try this out:

System.Text.RegularExpressions.Regex.Match(“Input string”,"(?<=total - ).\S+)").Value

Output:-

RegEx2

Regards,
NaNi

1 Like

Hi @Marian_B

We can also try with split method!

Split(inputString,“-”)(1) will result your expectation!

Regards

1 Like

Its working. Thanks you for looking into it @Gokul001 @lakshman @THIRU_NANI @pravin_calvin

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.