How to count of sub-string occurrences within a string (not char occurrences) [duplicate] October 8, 2023 by Tarik Regex.Matches(input, "OU=").Count