从表中的单个字段中查找不同的正则表达式模式的良好标准做法是什么?

发布于 2024-12-05 14:05:12 字数 460 浏览 1 评论 0原文

我正在寻找一种标准方法来生成 sql 2000-2008r2 表中单个字段中可能出现的所有独特模式。是否有一个简单的工具可以生成所有不同的静态模式。还有一个独特的正则表达式模式的名称。我正在尝试执行此 t-sql,但也会在 c#、vb6、甚至 javascript 中执行此操作。我注意到撇号以及 : 或其他文本都可以发挥作用。有没有好的方法来检测用户何时输入各种组合?

\d{1,1}\d{1,1}\d{1,1}[.]\d{1,1} 对于 111.10 或 201.90 来说是相同的模式。

如果我有其他模式(例如“退款”),我希望看到类似 [Az]{6,6} 的内容。是否有正则表达式的命令或工具可以生成这些不同但静态的模式,以便当新模式出现时,我可以在其发生时添加日期和时间戳并对其进行验证。当有人输入 7 个字符时,我希望退款下捕获的模式现在也接受“余额”模式。 [Az]{6,7} 现在可以接受,并且在管理员进行验证后不会导致用户收到警报。

谢谢

I'm looking for a standard approach to generate all the unique patterns that can occur in a single field in an sql 2000-2008r2 table. Is there a simple tool that will generate all the different static patterns. Also is there a name for a distinct regular expression pattern. I'm trying to do this t-sql, but will also perform this in either c#, or vb6, or even javascript. I've noticed that apostrophes can come into play, as well as : or other text. Is there a good way to detect when a user puts in various combinations?

\d{1,1}\d{1,1}\d{1,1}[.]\d{1,1} would be the same pattern for 111.10 or 201.90.

If I have other patterns such as "Refund" I want to see something like [A-z]{6,6}. Is there a command or tool for Regular expression that would generate these distinct but static patterns, so that when a new pattern crops up, I can date and time stamp when it occurs and have it be validated. When someone type 7 characters, I want the Patterns that were caught under Refund to now also accept the pattern for "Balance". [A-z]{6,7} is now acceptable and won't cause the user to be alerted after validation has occurred by an admin.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

め可乐爱微笑 2024-12-12 14:05:12

我认为你的问题没有遇到足够多的标准实践......

虽然可以分析两个正则表达式并确定它们是否相等,但我认为没有人真正这样做并提供结果...

I don't think your question gets encountered enough to have a standard practice...

While it would be possible to analyze two regular expressions and deterimine if the are equivalent, I don't think anyone has actually done so and made the results available...

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