replace match to indexOf