概要
Rubyの記法で調査したメモ
前提
Ruby初心者
Rubyの文字列表記法
文字列を正規表現として扱う。
/Ruby正規表現/
※正規表現の詳細は公式にて
文字列に変数の値を含む
:test = "てすと"
puts "いめーじ:#{test}"
変数名と同じ文字列や特殊記号を、文字列として扱う(「.」など)
※「"」で表現する場合、「"\."」とするためURLなどの場合に使用するイメージ。
:test = 'test.com'
puts test
Go to list of users who liked
More than 3 years have passed since last update.
Rubyの記法で調査したメモ
Ruby初心者
/Ruby正規表現/
※正規表現の詳細は公式にて
:test = "てすと"
puts "いめーじ:#{test}"
※「"」で表現する場合、「"\."」とするためURLなどの場合に使用するイメージ。
:test = 'test.com'
puts test
Register as a new user and use Qiita more conveniently
Go to list of users who liked