Remove Character in string

Hi,

I want to remove a word in the string thats like this below

haskhdjasgd

Total Marks : 20

in this i need to remove Total Marks : 20 this marks that numeric value and what ever mentioned : thats not a common word it may vary common word is total marks how can we go for this

Thanks in advance :slight_smile:

Regards,
Shriharsha H N

1 Like

Build a Regex & Use the matches activity.

so you want only hasdkjhsad this from the above string?
@Shriharsha_H_N

if so you can do this

arrayVar = yourStringVar.Split(Environment.NewLine.ToCharArray)
now use message box like this arrayVar(0) you’ll get the output as jhgaskgd
Cheers
@Shriharsha_H_N

@Pradeep_Shiv yes

1 Like

Hi @Shriharsha_H_N,

Use assign activity and do the following ,

marks = system.Text.RegularExpressions.Regex.Match(inputSTR,“([0-9])\w+”).ToString

Thanks

2 Likes