在测试我的 Google App Engine 应用程序时,我搜索了包含应用程序引擎 key 的链接。例如:
/story/ag5yZXBsaWUtdGVzdGluZ3IMCxIFU3RvcnkY-w0M/
这些键中允许使用哪些字符?我一直在使用正则表达式 [a-zA-Z0-9]
,但似乎也允许使用“-”。还有什么?
有这方面的引用吗?我在 App 引擎文档中找不到它。
最佳答案
Google App Engine key 使用 URL 安全 base 64 编码进行编码(请参阅 The source code for the Key datastore type)。
关于regex - Google App Engine key 中允许使用哪些字符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1940128/