文本、数字和小数的正则表达式

发布于 2024-09-27 04:30:21 字数 146 浏览 0 评论 0原文

我正在尝试获取文本、小数和小数的正则表达式。表达式必须同时匹配所有内容。

主要问题是我必须为 Zend_Search_Lucene 编写一个分析器才能搜索十进制数字。现在我只能搜索文本和数字。所以我猜它会匹配十进制数字以使其成为标记,从而成为有问题的正则表达式。

I am trying to get a regular expression for text, decimals and decimal numbers. The expression must match all at once.

The main problem is that I had to write an Analyzer for Zend_Search_Lucene in order to be able to search for decimal digits. Right now I can only search for texts and numbers. So I guess it to match decimal numbers to make them tokens and thus the regular expression in question.

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

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

发布评论

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

评论(1

孤独患者 2024-10-04 04:30:21

好吧,现在我觉得很愚蠢,但无论如何。我终于得到了我想要的。 [a-zA-Z0-9.]+ 就成功了。想象一下那有多短。

Okay now i feel stupid but anyways. I finally got what I wanted. This, [a-zA-Z0-9.]+ did the trick. imagine how short that was.

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