Find a word using regular expression in c#
-
Hi, I need to find a word using regular expression in c#. Can anybody have an idea? Please.. Thanks, Regards, Periyasamy
-
Hi, I need to find a word using regular expression in c#. Can anybody have an idea? Please.. Thanks, Regards, Periyasamy
string s="sanforjackass"; s.Contain();
-
Hi, I need to find a word using regular expression in c#. Can anybody have an idea? Please.. Thanks, Regards, Periyasamy
Use Regex and MatchCollection class from System.Text.RegularExpression... sample code here Pattern "\w" stand for word .... Read here http://www.regular-expressions.info/charclass.html
Regex obj = new Regex("\\\\w+"); MatchCollection c = obj.Matches("3 idiots is an wonderful movie"); foreach (Match m in c) { MessageBox.Show(m.Value); }
Thanks, Arindam D Tewary
-
Use Regex and MatchCollection class from System.Text.RegularExpression... sample code here Pattern "\w" stand for word .... Read here http://www.regular-expressions.info/charclass.html
Regex obj = new Regex("\\\\w+"); MatchCollection c = obj.Matches("3 idiots is an wonderful movie"); foreach (Match m in c) { MessageBox.Show(m.Value); }
Thanks, Arindam D Tewary
Hi, Thanks to your reply.It helps me. Regards, Periyasamy.