T
T
treedestroyed2021-12-30 04:32:38
Notepad++
treedestroyed, 2021-12-30 04:32:38

How to replace multiple text between BEFORE and AFTER a word in notepad++?

The text looks like this:
UnlockAssetID=4210,UITexture=1,UnlockAssetID=4211,UITexture=2,UnlockAssetID=4212,UITexture=3

This is just one line, there are more than a hundred of them, and you need to replace the entire contents of the UnlockAssetID= value at one time from the entire text to 0 so as not to affect the rest and so that the text after the replacement looks like this:
UnlockAssetID=0,UITexture=1,UnlockAssetID=0,UITexture=2,UnlockAssetID=0,UITexture=3

Simply put, you need to replace the numbers between the text UnlockAssetID= and ,UITexture
How to do it in the replacement window? Which search pattern/expression would be appropriate? So far I have not been able to find the right answer, please help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dollar, 2021-12-30
@treedestroyed

You need to select the "regular expressions" mode .
\d+are numbers in a row (from 1 to infinity).

  • To find:UnlockAssetID=\d+,
  • Replaced by:UnlockAssetID=0,

screenshot
61cd2c31383b8086636735.png

See also: Regular Expressions (Wikipedia)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question