이스케이프 처리 된 html 문자열의 ID는 어떻게 일치합니까? 문자열의 일부는 내가 art_images_attributes_0_attachement에게Ruby가 이스케이프 처리 된 html 문자열의 일부와 일치합니다.
"<div class=\"input string optional\"><label class=\"string optional\" for=\"art_images_attributes_0_attachement\"> Attachement</label><input class=\"string optional\" id=\"art_images_attributes_0_attachement\" maxlength=\"255\" name=\"art[images_attributes][0][attachement]\" size=\"50\" type=\"text\" /></div>"
=> "<div class=\"input string optional\"><label class=\"string optional\" for=\"art_images_attributes_0_attachement\"> Attachement</label><input class=\"string optional\" id=\"art_images_attributes_0_attachement\" maxlength=\"255\" name=\"art[images_attributes][0][attachement]\" size=\"50\" type=\"text\" /></div>"
안부를 필요로 ID = \ 시작 "및 \로 끝나는"이 예에서. Asbjørn Morell는
고마워요. 정확히 내가 찾던 곳 이었어. string.match (/ id = "([^"] *) "/) [1] – atmorell