Replacing comma by dot only in numbers in a texteditor using search and replace function

TinglTanglBob

i got a table as txt.file with all the variables beeing seperated by ;.

Lets say i got 3 Variables: ID, Size and Comment.

My Data could look something like this:

1;1.5;hello. how are you?  
2;2.5;a comment.  
3;2.1;another comment.

Now i would like to replace the comma-sign from dot to comma.
If i use the standard search and replace function in my text-editor it will change all . to , without any problem. But i want to change only those . to , which are surrounded by numbers left side and right side.
1.5 should be changed to 1,5 but hello. how are you? should not be changed to hello, how are you?

I found a regular expression for searching only dots surroundet by numbers:

[0-9][\\.][0-9] 

Now i would like to replace those surroundet dots, but unfortunately it doesn't work yet. When replacing [0-9][\\.][0-9] by ,, 1.5 is changed to , only instead of 1,5.

Is there any nice way to use search and replace from a texteditor to solve this problem?

Thanks in advance!

Srdjan M.

EditPlus does not support lookbehinds, so you need to use groups.

(\d)\.(\d)

Substitution: \1,\2

  • () Capturing group
  • \d matches a digit (equal to [0-9])
  • \1 \2 Capturing group 1. and group 2.

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Replacing dot with comma from a dataframe using Python

From Dev

Allow dot and comma in numbers, not only for decimal

From Dev

JavaScript to allow only numbers, comma, dot, backspace

From Dev

Replace ,(comma) by .(dot) and .(dot) by ,(comma)

From Dev

Replacing comma with dot Char

From Dev

How to replace number dot (.) with a comma (,) using java

From Dev

Replacing dot with comma in Ruby spreadsheet

From Dev

Replace dot with comma on SELECT

From Dev

Need to replace "comma" with 'dot'

From Dev

how to replace comma with dot

From Dev

Powershell replace function - replacing lines with numbers

From Dev

How to use jquery function on numbers separated by .(dot) or ,(comma) as thousands separator

From Dev

Replace comma with dot in a input Javascript

From Dev

replace comma to dot in perl array

From Dev

javascript replace comma with dot / paypal

From Dev

Replace comma with dot in a input Javascript

From Dev

match float with comma and then replace comma with dot?

From Dev

Regex for replacing times with comma to a dot in Python

From Dev

Number input replacing decimal comma with dot

From Dev

wildcard search using replace function

From Dev

Using only a slice of meshgrid or replacing it for evaluating a function

From Dev

Replace only replacing the first

From Dev

Set regex for only 2 decimal numbers + dot + comma with jquery validator plugin

From Dev

Replace a dot with a comma inside a jQuery template

From Dev

replace comma with dot in scientific notation in r

From Dev

Replace comma with a dot while typing jQuery

From Dev

In Java, convert the dot to comma in DecimalFormat replace method

From Dev

Replace a dot with a comma inside a jQuery template

From Dev

How to replace dot with comma in price format in php

Related Related

  1. 1

    Replacing dot with comma from a dataframe using Python

  2. 2

    Allow dot and comma in numbers, not only for decimal

  3. 3

    JavaScript to allow only numbers, comma, dot, backspace

  4. 4

    Replace ,(comma) by .(dot) and .(dot) by ,(comma)

  5. 5

    Replacing comma with dot Char

  6. 6

    How to replace number dot (.) with a comma (,) using java

  7. 7

    Replacing dot with comma in Ruby spreadsheet

  8. 8

    Replace dot with comma on SELECT

  9. 9

    Need to replace "comma" with 'dot'

  10. 10

    how to replace comma with dot

  11. 11

    Powershell replace function - replacing lines with numbers

  12. 12

    How to use jquery function on numbers separated by .(dot) or ,(comma) as thousands separator

  13. 13

    Replace comma with dot in a input Javascript

  14. 14

    replace comma to dot in perl array

  15. 15

    javascript replace comma with dot / paypal

  16. 16

    Replace comma with dot in a input Javascript

  17. 17

    match float with comma and then replace comma with dot?

  18. 18

    Regex for replacing times with comma to a dot in Python

  19. 19

    Number input replacing decimal comma with dot

  20. 20

    wildcard search using replace function

  21. 21

    Using only a slice of meshgrid or replacing it for evaluating a function

  22. 22

    Replace only replacing the first

  23. 23

    Set regex for only 2 decimal numbers + dot + comma with jquery validator plugin

  24. 24

    Replace a dot with a comma inside a jQuery template

  25. 25

    replace comma with dot in scientific notation in r

  26. 26

    Replace comma with a dot while typing jQuery

  27. 27

    In Java, convert the dot to comma in DecimalFormat replace method

  28. 28

    Replace a dot with a comma inside a jQuery template

  29. 29

    How to replace dot with comma in price format in php

HotTag

Archive