1
Fregeで正規表現リテラルを指定するために使用される重アクセント記号のユニコードコードとは何ですか?FregeのRegexリテラル
Fregeで正規表現リテラルを指定するために使用される重アクセント記号のユニコードコードとは何ですか?FregeのRegexリテラル
文字はとなります。急性アクセントとそのユニコードは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').