I'm working in .net c# and I have a string text = "Whatever text FFF you can FFF imagine"; What i need is to get the quantity of times the "FFF" appears in the string text. How can i acomplished that? Thank you.
You can use regular expressions for this and right about anything you want:
string s = "Whatever text FFF you can FFF imagine";
Console.WriteLine(Regex.Matches(s, Regex.Escape("FFF")).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