Jun 21, 2004 #1 StylizIT Programmer Joined Dec 4, 2003 Messages 62 Location NL anyone know the expression to find the " character in a string? You can better regret that you have done something than regret the fact you done nothing
anyone know the expression to find the " character in a string? You can better regret that you have done something than regret the fact you done nothing
Jun 21, 2004 #2 cappmgr Programmer Joined Jan 29, 2003 Messages 639 Location US try this Code: Match MyRegMatch = Regex.Match(_input,"\""); if(MyRegMatch.Success) { Console.WriteLine("good string " + _input); } else { Console.WriteLine("bad string " + _input); } Marty Upvote 0 Downvote
try this Code: Match MyRegMatch = Regex.Match(_input,"\""); if(MyRegMatch.Success) { Console.WriteLine("good string " + _input); } else { Console.WriteLine("bad string " + _input); } Marty
Jun 21, 2004 Thread starter #3 StylizIT Programmer Joined Dec 4, 2003 Messages 62 Location NL thanks for the help, but I already fixed my problem I used regex.ismatch(me.text, "\W"). The problem I'm facing now is that I also want to check if the first char in a string is a space with regex. If so it should return false. You can better regret that you have done something than regret the fact you done nothing Upvote 0 Downvote
thanks for the help, but I already fixed my problem I used regex.ismatch(me.text, "\W"). The problem I'm facing now is that I also want to check if the first char in a string is a space with regex. If so it should return false. You can better regret that you have done something than regret the fact you done nothing
Jun 21, 2004 #4 cappmgr Programmer Joined Jan 29, 2003 Messages 639 Location US try this Match MyRegMatch = Regex.Match(_input,"^[\\S]"); Upvote 0 Downvote