REGEX question

  • Thread starter Thread starter pvong
  • Start date Start date
P

pvong

Can someone help me write a regex that will accept number but NO COMMAS.

Yes to
123456.78

No to
123,456.78

Thanks!
Phil
 
Can someone help me write a regex that will accept number but NO COMMAS.

Yes to
123456.78

No to
123,456.78

Hi Phil,

Do you need it for the RegularExpressionValidator control?

Try this one

^\d+(\.\d\d)?$

Hope it works
 
Hi Phil,

Do you need it for the RegularExpressionValidator control?

Try this one

^\d+(\.\d\d)?$

Hope it works

If the digits after the decimal point are always there:

^\d+\.\d\d$
 
Yes and this is perfect!!!!
Thanks!


Alexey Smirnov said:
Hi Phil,

Do you need it for the RegularExpressionValidator control?

Try this one

^\d+(\.\d\d)?$

Hope it works
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

RegEx 5
Regex help 10
Regex Question 2
C# Regular expression to find all instance and add a prefix 2
Character Sets 2
Regex validation problem 3
Regex - Numbers 3
Simple Regex 3

Back
Top