Page 1 of 1

Replacing a range of values in metal map with single value

Posted: 28 Mar 2014, 19:58
by The Yak
So this is what my current metal_map_layout looks like: http://pastebin.com/9z7DRmSB

My question: what is the best way (in Notepad++ or the like) to replace all those different metal values with a single value (2.15)? I've been trying with regular expression but I don't understand it too well and each time get stuck at "it doesn't work and I have no idea why".

Re: Replacing a range of values in metal map with single val

Posted: 28 Mar 2014, 20:10
by CarRepairer
This works in Komodo Edit, which may be the same in NP++:

Code: Select all

metal = [\d\.]*}

metal = 2.15}

Re: Replacing a range of values in metal map with single val

Posted: 28 Mar 2014, 20:35
by The Yak
Nope just invalid expression error.

I learned that alt-click in column and type the value manually works. As of now that seems like the best way for Notepad++.

Re: Replacing a range of values in metal map with single val

Posted: 28 Mar 2014, 20:38
by CarRepairer
The Yak wrote:Nope just invalid expression error.

I learned that alt-click in column and type the value manually works. As of now that seems like the best way for Notepad++.
That is painful for me to read.

Re: Replacing a range of values in metal map with single val

Posted: 30 Mar 2014, 17:55
by zwzsg
I used:
Replace: metal\s*\=\s*[\d\.]+
With: metal = 2.15
and it worked.