just a little help on how to mask number to make proper currency value in Regular Expression with comma.. i made it this far..
₱\d*\.\d{2}
and it will mask
from 3342.34 to ₱开发者_StackOverflow3342.34
how to mask it with comma for every 3 digits? :)
thanks in advance..
Seeing as you have to use regex, here is your answer:
₱(?>\d{3},)*\d{1,3}(>?\.\d{1,2})?$
This will accept:
- ₱10
- ₱100
- ₱100,1
- ₱1.1
- ₱100,512,423.15
精彩评论