I was looking for a single step process to split a string, only once, based on a delimiter, only if the delimiter appears after certain index. For eg.
Input: String--> my-city-hasa-dash, Delimiter--> "-", index --> "3"
Though the first delimiter appears at 3rd position it is not > index supplied. so the regex should look for next occurrence of delimeter > index and split only once.
Output[]: {"mycity", "hasadash"}
Input: String--> m-ycityhasadash, Delimiter--> "-", index --> "3" Index of delimeter is less than the index supplied. So no split needed. Output[]: {"mycityhasadash"}