【发布时间】:2018-01-21 12:00:48
【问题描述】:
我需要实现正则表达式,该表达式接受电子邮件地址的双引号中的空格。例如,“带有空格的不寻常电子邮件”@domain.com。请注意,该电子邮件是双引号,并且是有效的电子邮件。
我正在使用 Postman 测试我的 api,下面是我的请求正文:
{"data":
{ "id": "#customerId",
"type": "customer s",
"attributes": {
"contactInformation" : {
"emailAddresses" :
[
{
"emailAddress" : "\"unusual email with space\"@domain.com"
}
]
}
}
}
}
请求通过并到达我的 api 控制器,但空格被换行符 (\n) 替换。
"\"unusual email with\nspace\"@domain.com"
我的请求标头包含:
内容类型:application/json 接受字符集:UTF-8
有人可以帮助如何获得与空格完全相同的字符串吗?
问候, 马亨德拉·拉索德
【问题讨论】:
标签: spring api spring-mvc spring-boot postman