1

After opening a config file for a game, I notice there is strength 5 strength and the '5' can be any random number. How do I replace every number after the word "strength" to a 1?

1
  • What is exact format? Paste the exact format of how it is in the file
    – Dan Smith
    Sep 7, 2014 at 23:56

1 Answer 1

0

Regular expressions are your friends, even when they can be your enemies if misused.
You want to do a search and replace with Regex enabled.
Search:
(strength)(\d+)(strength)
Replace:
\11\2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .