java - GUID可以包含反斜杠(\)吗?

标签 java

我想知道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/

相关文章:

java - 匿名类中的私有(private)变量/方法?

java - 我可以使用 Java 泛型在 Java 中对同一接口(interface)进行不同的实现吗?

java - 对于在实现相同接口(interface)的所有类中重复的方法实现,应使用什么设计模式?

java - 验证输入是数字、数字范围内的数字或特定字符

java - 断言 2 个字符串按字母顺序排列

java - 检查 count 是否在每一千之后包含 ,

java - 随机 java.lang.IllegalStateException : Cannot forward after response has been committed

java - 测量单位 API (JSR-363) - 浮点错误

Java:我无法多次运行 JTextArea?

java - 未为集合中的对象编写 JsonTypeInfo