在Rails中不起作用?
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>
如何在rails中执行preg_match_all
result = statement.scan('/<span style="text-decoration: underline;">(.*)<\/span>/U')
的'statement'你给不是一个有效的字符串 – Sajin