Added loop to find first occurence of actual string to solve abc=1&bc=2 issue.