How can I get how many times a string occurs in a textbox?
I thought the find function would return the number of times found but it seems to return the location of it.
Regex.Matches(textBox1.Text, Regex.Escape(inputString)).Count
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With