I've been trying to separate all numbers in a text file from the words, then run them through a formula in excel and batch replace them using a method similar to this in Notepad++.
In my situation, this doesn't work, as recurring numbers occur throughout the text and as such the search and replace gets stuck in an infinite loop no matter what I try to do. Especially when there are decimals AND integers involved, as Notepad++ cannot logically distinguish between 1.14, 1 and 14, so it gets messy.
Is there any way to do this directly in Notepad++ or somewhere online? Or, alternatively, is there a way to extract numbers from text, maintaining their space within the text, being able to edit all the values and then plug them back into their original positions in the document?
Edit:
I want to turn:
<OptionNumeric name='vnlaClayFreq' default='1' min='0' max='5' </OptionNumeric>
<Setting name='MotherlodeSize' avg=':= 1.648 * _default_ * vnlaClaySize ' range=':= 1.648 * _default_ * vnlaClaySize ' type='normal' />
<Setting name='MotherlodeHeight' avg=':= 64 ' range=':= 10 ' type='uniform' scaleTo='seaLevel' />
Into:
<OptionNumeric name='vnlaClayFreq' default='1' min='0' max='3' </OptionNumeric>
<Setting name='MotherlodeSize' avg=':= 0.824 * _default_ * vnlaClaySize ' range=':= 0.824 * _default_ * vnlaClaySize ' type='normal' />
<Setting name='MotherlodeHeight' avg=':= 32 ' range=':= 5 ' type='uniform' scaleTo='seaLevel' />
Where integers remain integers, getting rounded to the nearest whole number if necessary (i.e. 1 remains 1), while decimals get altered just as Toto's python code does (i.e. 1.0 becomes 0.5).