如何用逗号对实数进行正则表达式? [英] How to Regular Express real numbers with commas?

查看:127
本文介绍了如何用逗号对实数进行正则表达式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢您的帮助,

我为不同的文本框修改了正则表达式(在这里给了我),但是我无法理解.我用google搜索,发现了很多东西,但不是我想要的.

昏暗的有效AS布尔值= Regex.IsMatch(TextBox1.Text,"^(,?\ d +){0,20} $")
< b>产生</b>
(32,1,6,32,12,21,21,54,675,8,4,3,2,9,0,21,21,21,43,744)完美.


现在我想在TextBox2中使用逗号分隔20个双精度数字,例如
(32.43343,1.43,6.0,32.434334,12.43432,21.8776,21.89,54.22,675.1232,8.453,4.5454,3.87,2.00,9.65,0.0,21.12,21.2,21.1,43.5,744.3633).

请帮帮我.


谢谢...

Thanks for the help,

I worked around modifying regular expression (given to me here here) for different textbox, but i could''t get what I neeed. I google it, many things found but not for what i want.

Dim valid AS Boolean = Regex.IsMatch(TextBox1.Text, "^(,?\d+){0,20}$")
<b>produce</b>
(32,1,6,32,12,21,21,54,675,8,4,3,2,9,0,21,21,21,43,744) perfect.


NOW i want 20 double numbers separated by commas in TextBox2 like
(32.43343,1.43,6.0,32.434334,12.43432,21.8776,21.89,54.22,675.1232,8.453,4.5454,3.87,2.00,9.65,0.0,21.12,21.2,21.1,43.5,744.3633).

Please help me out.


thanks ...

推荐答案

)
< b>产生</b>
(32,1,6,32,12,21,21,54,675,8,4,3,2,9,0,21,21,21,43,744)完美.


现在我想在TextBox2中使用逗号分隔20个双精度数字,例如
(32.43343,1.43,6.0,32.434334,12.43432,21.8776,21.89,54.22,675.1232,8.453,4.5454,3.87,2.00,9.65,0.0,21.12,21.2,21.1,43.5,744.3633).

请帮帮我.


谢谢...
")
<b>produce</b>
(32,1,6,32,12,21,21,54,675,8,4,3,2,9,0,21,21,21,43,744) perfect.


NOW i want 20 double numbers separated by commas in TextBox2 like
(32.43343,1.43,6.0,32.434334,12.43432,21.8776,21.89,54.22,675.1232,8.453,4.5454,3.87,2.00,9.65,0.0,21.12,21.2,21.1,43.5,744.3633).

Please help me out.


thanks ...


听起来像您希望我们为您制作正则表达式.创建正则表达式有什么特别的麻烦?
Sounds like you want us to make your regular expression for you. What particular trouble are you having creating your regular expression?


这篇关于如何用逗号对实数进行正则表达式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆