使用匹配约束时,如何转义正则表达式中的正斜杠?这是我尝试过的:
constraints {
url (
matches: "^http://www.google.com/$"
)
}
错误:solution: either escape a literal dollar sign "\$5" or bracket the value expression "${5}"
constraints {
url (
matches: "^http:\/\/www.google.com\/$"
)
}
错误:unexpected char: '\'