Saturday 15 January 2011

Notepad++ regex to replace match with the opposite value (true->false, and false->true)? -



Notepad++ regex to replace match with the opposite value (true->false, and false->true)? -

i have big text file lot of lines below, i'd swap values of. in, if value 1 replace 0, if value 0 - replace 1.

hidden=0 hidden=1

i've worked out 'find' regex no problem:

hidden\=([01]{1})

my problem working out how replace opposite.

there's no getting around - takes 3 steps:

search | replace hidden=0 | hidden=x hidden=1 | hidden=0 hidden=x | hidden=1

but they're pretty simple.

in case have hidden=x in code, chose character x such hidden=? isn't found.

regex replace notepad++

No comments:

Post a Comment