0

We need to alternate a period to a comma in a .svg file(text file). These files are generated only with that format. It will be necessary alternate only after the word "value".

Example:

value="0.345234" to value="0,345234"

Actually we do this manually. Can't alternate all periods in current file, will result in errors. Don't have other compilers to use. We can use vba, try to create some type of .bat or download a portable compiler. My programming knowledge is not that big. Is there a way to do this?

Thanks in advance.

Squashman
  • 13,649
  • 5
  • 27
  • 36
  • Knowing which version of Windows you use would help. – Mark Setchell Dec 18 '17 at 12:47
  • Windows 7 Enterprise – Douglas Dec 18 '17 at 13:11
  • https://stackoverflow.com/a/17144445/2836621 maybe – Mark Setchell Dec 18 '17 at 13:18
  • Powershell seems to be useful, but i need to change what comes after "value" and not replace the word "value". Can i move the cursor (with code) until the first " after it find "value" and then replace dot with comma? – Douglas Dec 18 '17 at 13:59
  • 1
    What have you tried so far, where are you stuck? how does the `.svg` file look like? – aschipfl Dec 18 '17 at 14:28
  • Is [this](https://jsfiddle.net/0tuL6j8v/) simple code enough to do what you want? (place your code in the textarea and click the button replace) – user7393973 Dec 18 '17 at 14:40
  • @aschipfl i'm stucked in getting what comes after value, but user7393973 code helped me a lot. Now I need to do some modifications to use properly. Thanks for the help. – Douglas Dec 19 '17 at 12:10
  • If you don't append that code to your actual question body with a full explanation of how it requires modification, how do you expect us to help you with it? – Compo Dec 19 '17 at 17:46

1 Answers1

0

You can use Notepad++ regex Find-and-Replace. Open the file in Notepad++ and do a Find-and-Replace:

Find what: (value=[0-9]+)\.

Replace All with: $1,

Make sure that in the Find-and-Replace window you check the radio button next to "Regular expression" search mode

Josh Withee
  • 9,922
  • 3
  • 44
  • 62