Suppose I have a string like this:
string = \"Manoj Kumar Kashyap\";
Now I want to create a regular expression to match where Ka appears af
You don't need a regular expression to do that. I'm not a Java expert, but according to the Android docs:
public int indexOf (String string)
Searches in this string for the first index of the specified string. The search for the string starts at the beginning and moves towards the end of this string.Parameters
string the string to find.Returns
the index of the first character of the specified string in this string, -1 if the specified string is not a substring.
You'll probably end up with something like:
int index = somestring.indexOf(" Ka");