Fix syntax offset and regexp