我需要删除特殊字符,例如 /使用jsonata
json
{ "Data":"i need , to do the transformation / but I am not able " }
我需要使用jsonata删除特殊字符,
例如 “ ineedtodothetryformation butiamnotable”
请帮助我找到解决方案
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信这就是您要寻找的:
链接到jsonata Playground:https://www.stedi.com/jsonata/playground?statev2=eJw1jc0KwjAQhF9lWDxUiNTfS8WbF5%2BhqbBtVy20SUlSEI3vbgp6GmaYb6YsydvJNUKK5Dk68b6zJhmO67hJ%2BoamMwfWVGjqYERaKASL1iI8BMGx8TfrBg4JRI56CriABxgbwHUvaQAfPW9m2gALJ%2Ff0hOKEvLzy6lXlx18%2B9txINr%2Bpf00lWtNSm2XibdzGXdxTpehA1RfxMDne
Code:
<代码> $替换函数可以将正则表达式作为参数。在此示例中,
[^a-Za-Z]
与不是的任何内容匹配AZ(soulter/uppercase)之间的字母。I believe this is what you're looking for:
Link to solution in JSONata playground: https://www.stedi.com/jsonata/playground?statev2=eJw1jc0KwjAQhF9lWDxUiNTfS8WbF5%2BhqbBtVy20SUlSEI3vbgp6GmaYb6YsydvJNUKK5Dk68b6zJhmO67hJ%2BoamMwfWVGjqYERaKASL1iI8BMGx8TfrBg4JRI56CriABxgbwHUvaQAfPW9m2gALJ%2Ff0hOKEvLzy6lXlx18%2B9txINr%2Bpf00lWtNSm2XibdzGXdxTpehA1RfxMDne
Code:
$replace
function can take a regular expression as an argument. In this example,[^a-zA-Z]
is matching anything that's not a letter between a-z (lower/uppercase).