[英]Regex literal in Frege
在Frege中用於指定正則表達式文字的重音符號的unicode代碼是什么?
該字符稱為“ 急性口音” ,其Unicode為00B4
。 在ubuntu中,您可以使用Ctrl + Shift + u鍵入該00B4
,然后鍵入00B4
然后輸入space 。 但是,如果您的正則表達式文字不止一個字符,則不必真正使用該字符,在這種情況下,您只需使用撇號即可。
引用文檔 :
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').
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.