Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Normal
Dear all,I have a requirement to check if two words exist in a string.I have written below code, but that is not working. For example, in the below code, I want to have both words Hi and hello existing in the string, "check". How to write regular expression to have both words Hi and hello any where in the string.Please advise and thank you for your time and suggestion.============================================= Regex rx = new Regex(@"(Hi&hello)"); string check = "Hi and hello every one"; if (rx.IsMatch(check)) { Console.WriteLine("string contains either Odoo or #rules"); }==============================================Narayana Reddy GContinue reading...
Dear all,
I have a requirement to check if two words exist in a string.
I have written below code, but that is not working. For example, in the below code, I want to have both words Hi and hello existing in the string, "check". How to write regular expression to have both words Hi and hello any where in the string.
Please advise and thank you for your time and suggestion.
=============================================
Regex rx = new Regex(@"(Hi&hello)");
string check = "Hi and hello every one";
if (rx.IsMatch(check))
{
Console.WriteLine("string contains either Odoo or #rules");
}
==============================================
Narayana Reddy G
Continue reading...