Get text after first space

Hi Team,

Can you please help me how to get the entire string after the first space
Example: InputString: “ABC DEF GHI”
OutputString: DEF GHI

I have tried using below syntax
string.Join(" ", InputString.Split().Skip(1))
but it wont work for me.

Thanks in advance

@prathyusha_gattamaneni - you can try the below regex

Output = Regexvar(0).groups(1).tostring

Hope this helps…

Hi @prathyusha_gattamaneni

Please try this

test = “ABC DEF GHI”

test.substring(test.indexof(" “)+1,test.length-test.indexof(” ")-1)


Hi @prathyusha_gattamaneni
Just modify ur code , it is working fine.

String.Join(" “,Split(input,” ").Skip(1))

Nived N
Happy Automation

this article helps me a lot about working with text

Thank You everyone for helping me on this.

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