我想知道GUID
是否可以包含反斜杠(\
)。
我还没有见过这样的案例,但我只是想知道。
我正在使用 Java。
最佳答案
Here you are与有关 UUID 的 RFC 一起使用。
其中注明以下内容:
Each field is treated as an integer and has its value printed as a zero-filled hexadecimal digit string with the most significant digit first. The hexadecimal values "a" through "f" are output as lower case characters and are case insensitive on input. The formal definition of the UUID string representation is provided by the following ABNF [7]:
UUID = time-low "-" time-mid "-" time-high-and-version "-" clock-seq-and-reserved clock-seq-low "-" node time-low = 4hexOctet time-mid = 2hexOctet time-high-and-version = 2hexOctet clock-seq-and-reserved = hexOctet clock-seq-low = hexOctet node = 6hexOctet hexOctet = hexDigit hexDigit hexDigit = "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9" / "a" / "b" / "c" / "d" / "e" / "f" / "A" / "B" / "C" / "D" / "E" / "F"
The following is an example of the string representation of a UUID as a URN:
urn:uuid:f81d4fae-7dec-11d0-a765-00a0c91e6bf6
那么就不允许\
。
关于java - GUID可以包含反斜杠(\)吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46462889/