i want that maximum one figure after the dot.For example, i've 123.89 , with formatting : 123.8
On 17 mai, 14:19, Tom Davies <tgdav...@gmail.com> wrote: > On May 17, 9:00 pm, laurent <bagno_laur...@hotmail.com> wrote: > > > hello , > > > simple question.i've a problem with regular expression.When i do > > NumberFormat num = NumberFormat.getFormat("*.[0-9]) with > > Window.alert( num.format(123.14) ) , it don't print. I use the > > NumberFormat of GWT.I want that my double begin with 0...n > > characters,a dot and a figure between 0 and 9. > > Have a look at the Javadoc for > NumberFormat:http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/index.html?o... > > The patterns are not conventional regular expressions. > > NumberFormat patterns are not going to let you strip arbitrary non- > numeric characters from the front of your numbers (which is what you > say you want to do, although not what your example suggests). > > What number do you want to get from the string "123.14"? > > Tom > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-tool...@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com. > For more options, visit this group > athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.