© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•10mo ago•
16 replies
VoidPointer

Find all instances of a substring in a string

I would like to try and find all occurrences of a substring in a string without regex, and without looping through the string with IndexOf. Is this possible? Oh don't ask why, it's really an experimental, academic exercise.
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

❔ Find common substring at start of every string in list
C#CC# / help
3y ago
Searching a string for a substring containing operators
C#CC# / help
4y ago
Find all HREFs out of string and extract value
C#CC# / help
4y ago