2016-08-07 5 views

答えて

2

文字はとなります。急性アクセントとそのユニコードは00B4です。 Ubuntuのでは、uははCtrl +Shiftキー + を使用していることを入力して00B4その後、スペースを入力することができます。しかし、正規表現リテラルが複数の文字である場合は、実際にアポストロフィを使用することができます。 docを引用

Regular expression literals have type Regex and are written: 

´\b(foo|bar)\b´  -- string enclosed in grave accents 
'\w+'     -- string with length > 1 enclosed in apostrophes 
The notation with the apostrophes has been introduced because many have a hard time entering a grave accent mark on their terminal. However, it is not possible to write a regular expressions with length 1 this way, because then the literal gets interpreted as Char literal. (One can write something like '(?:X)' for a Regex that matches a single 'X').