I have a big string, and want to find the first occurrence of X, X is \"numberXnumber\"... 3X3, or 4X9...
How could i do this in C#?
For those who love extension methods:
public static int RegexIndexOf(this string str, string pattern) { var m = Regex.Match(str, pattern); return m.Success ? m.Index : -1; }