How to split particular text from string

@Rohit_Patil1 ,

In this case, Either we would require all the characters that are to be removed from the String or we could go for a more general approach using Regex as already mentioned. The Assign Activity would be updated like below :

CurrentRow("Height") = String.Join(",",Split(CurrentRow("Height").ToString,",").Select(Function(x)System.Text.RegularExpressions.Regex.Match(x,"[\d.]+").Value.ToString).ToArray)

Check this and let us know if it doesn’t work.

@supermanPunch Great! This Worked. Thanks!

1 Like

Hi @supermanPunch could you please help me in modification of below query if i want to extract only units like kg, cm, mm from $12kg, @123cm, #23mm etc.
CurrentRow(“Height”) = String.Join(“,”,Split(CurrentRow(“Height”).ToString,“,”).Select(Function(x)System.Text.RegularExpressions.Regex.Match(x,“[\d.]+”).Value.ToString).ToArray)

Hi @Rohit_Patil1 ,

Is this a different Query ? Earlier you wanted only the numbers from the strings right ?

If the earlier question was answered and solved, Could you create a New topic for this different query ?

We would like to separate the cases, so that we arrive at distinct solutions for particular case.

Sure @supermanPunch

1 Like

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