This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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?
 
wood burning stoves
 
subject: RegExpr to Add Comma and Decimal Points
 
Similar Threads
Regular Expression for any number
Regular expression
Validating an Amount Field
Need regex to solve
creating a method inserting commas correctly in a given number