弗雷格的正则表达式字面意思

时间:2016-08-07 23:59:48

标签: frege

用于在弗雷格指定正则表达式文字的重音标记的unicode代码是什么?

1 个答案:

答案 0 :(得分:2)

该角色名为 Acute Accent ,其中的unicode为00B4。在ubuntu中,您可以使用 Ctrl + Shift + u 键入,然后键入00B4,然后键入 space 。但是,如果你的正则表达式文字不止一个字符,你就不必使用它,在这种情况下你可以使用撇号。

引用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').