Remove balnk spaces from Match datatype variable

var_match = [ 1234567.00], where variable var_match is of IEnumerable Match datatype,
I need to remove extra space in Output ie [1234567.00]

Option-1 How can we convert Match datatype to String ? (we can use Trim or Replace functions)

Option-2 How can we remove Spaces from Match datatype variable ?

Any suggestions for above Options ?

HI @prerna.gupta

Have you tried with .tostring.Trim

var_match.ToString.Trim

Regards
Gokul

Hi,

If you need string array which is extra space deleted, the following will work.

image

arrStr = iematch.Select(Function(m) m.Value.Replace(" ","")).ToArray()

arrStr is string array , iematch is IEnumerable<Match>

Regards,

image
Yes i already tried but getting above Error,
here str_Credit is Match datatype variable

Hello @prerna.gupta
Check your variable try of str_Credit with the below screenshot
image

If it same, Try this

Credit_String=str_credit(0).tostring.trim

Credit_string must be String variable type