need help replacing multiple "answers" to these lines?
-
Hello, im completely new to NotePad++, and i need help figuring out how to change this all at once. i dont want to sit here and do it all individually lol.
im using a minecraft mod config file and i want to change all the, for example,
“stamina”: 1200to
“stamina”: 9999or,
“speedModifier”: 1.5,to
“speedModifier”: 2,all of the “speedModifier” tokens (I think thats what theyre called) to 2, and all the “stamina” to 9999.
heres an example snip.
Help please!!
-
You have to enable “Regular expression” in Replace and you will add
Find what:"stamina":\s*\d+
Replace with:"stamina": 9999
Find what:
"speedModifier":\s*\d+(\.\d+)?
Replace with:"speedModifier": 2
You can do each replacement separately, or manage all replacements in a list using the MultiReplace plugin.
-
@Thomas-Knoefel said in need help replacing multiple "answers" to these lines?:
Find what: “speedModifier”:\s*\d+(.\d+)?
THANK YOU SO MUCH!
-
You might also be able to achieve this with the query
@..stamina = 9999; @..speedModifier = 2
in the JsonTools plugin.
In this case a regex-based solution as described by Thomas Knoefel will work fine, but if you want more control over how you manipulate your JSON, a JSON parser like JsonTools is likely a better option.