-1

레일에서 작동하지 않는 경우 ?? 이 도움 여부
statement= '<p>As he opened the door, Winston saw that he had left the diary open on the table. DOWN WITH BIG BROTHER was written in it, in letters you could almost <span style=\"text-decoration: underline;\">read</span> across the room.</p>\r\n<p>But everything was all right. A small, sad-looking woman was standing outside.</p>\r\n<p>'Oh, Comrade Smith,' she said, in a dull little voice, 'do you think you could come across and help me with our kitchen sink? The water isn't running away and ...'</p>\r\n<p>레일에서 preg_match_all을 수행하는 방법

result = statement.scan('/<span style="text-decoration: underline;">(.*)<\/span>/U') 
+0

만약'당신은 유효한 문자열이 아닌 준 statement' – Sajin

답변

1

확인합니다. 다음

statement= "<p>As he opened the door, Winston saw that he had left the diary open on the table. DOWN WITH BIG BROTHER was written in it, in letters you could almost <span style='text-decoration: underline;'>read</span> across the room.</p>\r\n<p>But everything was all right. A small, sad-looking woman was standing outside.</p>\r\n<p>'Oh, Comrade Smith,' she said, in a dull little voice, 'do you think you could come across and help me with our kitchen sink? The water isn't running away and ...'</p>\r\n<p>".html_safe 

result = statement.scan(/<span style='text-decoration: underline;'>.*<\/span>/) 
#=> ["<span style='text-decoration: underline;'>read</span>"]