I want extract particular part of string?

Ex : I have the below string
string -124/598 986
result- 598

Thanks in advance

Hi,

How about the following expression?

 System.Text.RegularExpressions.Regex.Match(yourString,"(?<=/)\d+").Value

Regards,

1 Like

Hi @smrutismita.samal ,

Here’s another way:

"124/598 986".split(" "c).First.split("/"c)(1)

Regards,

1 Like

Hi @smrutismita.samal

How about this Regular expression?

System.Text.RegularExpressions.Regex.Match(yourString,"(?<=\/)\d+").Value

image

Regards
Gokul

1 Like

Hi @smrutismita.samal

Try using the following Regex expression in “Find Matching Patterns” activity or use an assign activity and give the syntax as below:

Regex Expression: (?<=\/)[\d]+

In Assign activity:

Varname= System.Text.RegularExpressions.Regex.Match(yourString,"(?<=\/)[\d]+").Value

Hope it helps!!
Regards,

1 Like