Update reference with strchr and strstr