K
Kevin
Hi,
Is anyone in this group good at regular expression? I have a seemingly
simple problem, but cannot figure it out myself. I appreciate any help!
What I want to check is "dog" appear exactly twice in the searchString. If I
enter "^(.*dog.*){2}$", the expression matches even when "dog" appear 3
times. I want to check if "dog" appear exactly 2 times.
Regex regEx = new Regex("???");
string searchString = "my dog is my dog";
Thanks!
Is anyone in this group good at regular expression? I have a seemingly
simple problem, but cannot figure it out myself. I appreciate any help!
What I want to check is "dog" appear exactly twice in the searchString. If I
enter "^(.*dog.*){2}$", the expression matches even when "dog" appear 3
times. I want to check if "dog" appear exactly 2 times.
Regex regEx = new Regex("???");
string searchString = "my dog is my dog";
Thanks!