Yes,
But a REGEXP can parse a whole text at once. And you forgot in your example
code to include a logic to split the text for all words. And your code
should also make sure that all words are split correctly at the ending and
the beginning of a word boundry... So your code will grow quite complex very
fast. And if you handle all those special cases, then i am not sure if you
are really faster then a RegExp. Also the .NET Regexp engine is quite fast!
And I would suggest a slightly different regexp..
(en(\w){1,}g)
-> will also match "whateverending" but it will only return "ending"
(Hint: use word boundrys in your match)
Another match could be "... encodingsession ..."
-> "encoding"
(Hint: use lazy quantifiers... Regexp matches are greedy by default)
For a good summary of what you can do I would suggest
http://www.regular-expressions.info/quickstart.html
So much for fussing about the other regexp, and here is my own suggestion
\b(en(\w)*?g)
\b = beginning of a word , followed by a literal "en" , followed buy as many
"letters" as needed, and must be ending with a "g"