Count the number of times a string appears within a string [duplicate]

Regex.Matches(input, "true").Count

Leave a Comment