I would like to replace all string that do not equal this: readWriteDataGroup="Everyone" on a file I have open in Notepadd++. One of the strings that it will need to replace has this string: readWriteDataGroup="E_MOD_WSP_64"
So I have been doing this manually but there is over 1000000 lines which is not feasible to be done manually.
How can I do this via regex?
If you search for
(readWriteDataGroup=")(?!Everyone")[^"]*(")and replace it with$1X$2then all the lines that do not containEveryonein the quotation marks will be replaced with anX.How that works:
In the search string
(readWriteDataGroup=")will matchreadWriteDataGroup="and save it as$1(?!Everyone")[^"]*will match any string that isn'tEveryone(")will match a trailing"and save it as$2In the replacement:
$1is the first capture group (readWriteDataGroup=")Xis the replacement text$2is the second capture group (")You can try it here: https://regex101.com/r/Bum3HU/2
In Notepad++, make sure you select the "Regular Expression" button on the Replace dialog.