Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

Replace "11.1111.1111,00" with "1111111111.00"

Hi,

   i have a String variable and i need replace the value  "11.1111.1111,00" with "1111111111.00" how i do, because the replace sentence not function.  Thanks a lot.
0
jlguerra
Asked:
jlguerra
1 Solution
 
bloodredsunCommented:
try this,

      String num = "11.1111.1111,00" ;
      num = num.replaceAll( "\\." , "") ;
      num = num.replaceAll( "," , ".") ;      
      System.out.println( "num is " + num) ;

outputs:
num is 1111111111.00
0
 
jlguerraAuthor Commented:
Thanks you bloodredsun !!!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now