Regular Expression that matches anything after space in C# .Net

Last Reply on Jun 18, 2013 06:18 AM By bebins

Posted on Jun 18, 2013 04:38 AM

i have a string like

str="arun vijay"

 

i want only vijay..can anyone tel the regex for this 

Posted on Jun 18, 2013 04:40 AM

You can simply do

string str = "Arun  Vijay";
string ret = str.Split(' ')[1];

 


Posted on Jun 18, 2013 06:18 AM
Regex RegExp = new Regex(str.Replace(" ", "|").Trim());

 

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html