Railo 的快速正则表达式问题
我猜下面的代码行对很多人来说看起来很熟悉......[^A-Za-z0-9]
我想做的是保留一块“文本”,如上所述的字母数字,加上标点符号和 SQL for MS Access 可以处理的其他特殊字符,另外,# 符号的特殊字符将替换为 # # (双倍转义单个 #)用于我正在使用的底层脚本语言(Railo)。因此,总而言之,我想在将字符串写入数据库表之前删除 Access 和 Railo 无法处理的任何字符。
上面的字母数字是一个开始。你能帮忙完成它吗?
谢谢。
I guess the following line of code looks familiar to many...[^A-Za-z0-9]
And what I'd like to do is to keep a block of "text", alphnumeric as stated above and plus punctuations and other special characters that sql for MS Access can handle, also, the special character of # sign would be replaced with ## (a double of it to escape a single #) for the underlying scripting language I'm using (Railo). So, to sum up, I'd like to remove any character that Access and Railo can't handle prior to writing the string into a db table.
The above alphnumeric is a start. Can you help to make it complete?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Railo 可以处理我所知道的每个角色。不知道问题的作者想表达什么。英镑字符是我所知道的唯一需要转义的字符。如果用户正确使用了正确的
,他应该能够在 Access 中插入他想要的任何内容。Railo can handle every character that I'm aware of. Not sure what the author of the question is implying. The pound character is the only character that I'm aware of that needs to be escaped. If the user used the proper
<cfqueryparam>
correctly, he should be able to insert just about anything he wants in Access.