Sud*_*raj 5 yaml node.js swagger
如何pattern使用 Swagger Node.js 注释正确定义以下正则表达式?
* reviews_ratings_description:\n * type: string\n * minimum: 10\n * maximum: 50\n * pattern: "^[ a-zA-Z0-9](?!,.*?[^\\na-zA-Z0-9!\xe2\x80\x9d$%&~^&#<>.?:"\'\xe2\x80\x99=@()*\\+,\\/;\\[\\\\\\]\\-^_`{|}~]{1}).*?[a-zA-Z0-9!\xe2\x80\x9d$%&~^&#<>.?:"\'\xe2\x80\x99=@()*\\+,\\/;\\\\\\\\]\\-^_`{|}~]$" \nRun Code Online (Sandbox Code Playgroud)\n\n运行上面的代码会产生以下错误:
\n\n{"error":{},"level":"error","message":"uncaughtException: YAMLException: can not read an implicit mapping pair; a colon is missed at line 42, column 159:\\n ... \\"\'\xe2\x80\x99=@()*\\\\+,\\\\/;\\\\[\\\\\\\\\\\\]\\\\-^_`{|}~]$\'\\n\nRun Code Online (Sandbox Code Playgroud)\n\n字符串是否pattern需要以某种方式转义?
| 归档时间: |
|
| 查看次数: |
3301 次 |
| 最近记录: |