extract string from code