This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes RegExpr to Add Comma and Decimal Points Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "RegExpr to Add Comma and Decimal Points" Watch "RegExpr to Add Comma and Decimal Points" New topic
Author

RegExpr to Add Comma and Decimal Points

Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 569
I am playing around with regular expressions and want to see if I can use it to add commas and decimal point to my money input field in the most concise way. However, I can only achieve adding a single comma and decimal point with a single line:

Does regular expressions provide any other facilities to add the remaining commas?
 
I agree. Here's the link: http://kickstarter.com/rocket-mass-heater
 
subject: RegExpr to Add Comma and Decimal Points