Use a regex:
public static Regex regex = new Regex(@"PPP\sPassword\s+.*|PPP\sUsername\s+=.*",
RegexOptions.CultureInvariant
| RegexOptions.Compiled
);
MatchCollection ms = regex.Matches(InputText);
Get a copy of
Expresso [
^] - it's free, and it examines and generates Regular expressions.