Railo 的快速正则表达式问题

发布于 2024-09-24 04:18:25 字数 277 浏览 1 评论 0原文

我猜下面的代码行对很多人来说看起来很熟悉......
[^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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

纵性 2024-10-01 04:18:25

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文