How to replace the comma sign of floating point numbers

How to replace the comma sign of floating point numbers

2
NewbieNewbie
2

    Jul 31, 2006#1

    Hi, everybody, one question: how to replace this (some commas)

    wp_pos=(995,6089,0,8311,-262,6691)

    to

    wp_pos=(995.6089,0.8311,-262.6691)

    I have over 400 lines in just one file txt.
    Thanks

    344
    MasterMaster
    344

      Aug 02, 2006#2

      Hi,

      what is the rule ?
      Seems to be "change when value is between 0 and 1).
      Replace with new stype perl regexp:
      "([^0-9])0([,)])"
      with:
      "\10."

      changes:
      wp_pos=(0,6089,0,8311,-260,6691)
      to:
      wp_pos=(0.6089,0.8311,-260,6691)


      rds Bego
      Normally using all newest english version incl. each hotfix. Win 10 64 bit

      6,675585
      Grand MasterGrand Master
      6,675585

        Aug 02, 2006#3

        Hm, it looks like x,y,z coordinates with floating point numbers with wrong comma sign.

        Try this UltraEdit style regular expression:

        Find: ^(wp_pos=(-++[0-9]+^),^(-++[0-9]+,-++[0-9]+^),^(-++[0-9]+,-++[0-9]+^),^(-++[0-9]+)^)
        Replace: ^1.^2.^3.^4

        Or this one for Unix/Perl style:

        Find: (wp_pos=\(-*\d+),(-*\d+,-*\d+),(-*\d+,-*\d+),(-*\d+\))
        Replace: \1.\2.\3.\4


        Note: I modified the subject of this thread to a much better and hopefully correct one.
        Best regards from an UC/UE/UES for Windows user from Austria

        344
        MasterMaster
        344

          Aug 02, 2006#4

          Hi Mofi,

          aint the rule just: replace "non-number, zero, komma " with "non-number, zero, point" ?

          rds Bego
          Normally using all newest english version incl. each hotfix. Win 10 64 bit

          2
          NewbieNewbie
          2

            Aug 03, 2006#5

            Thank you guys!, the new subject is correct, they are xyz coordinates, now I'will try.
            Franco