Description. at http://ruby-doc.org/core-2.2.0/String.html#method-i-slice-21. In the example string = "this is a string" string.slice!(/s.*t/) #=> "sa st".
確定! 回上一頁