Change and move a string
-
Hello,
I tried a lot, but nothing worked.
How to move a text in a line?
The lines look about this:[combobox “Text 1”][button “Expand List”]‘/>
[combobox “Text 2”][button “Expand List”]’/>
[combobox “Text 3”][button “Expand List”]'/>and I want to change it like this:
[group “Text 1”].combobox[button “Expand List”]‘/>
[group “Text 2”].combobox[button “Expand List”]’/>
[group “Text 3”].combobox[button “Expand List”]'/>Can anybody help me
Thanks a lot
-
@Knowledge-Base
find what:(\[(combobox) (".+")\])
replace with:\[group \3\]\.\2
because
[
and]
and.
do have special meanings in regex, they need to be escaped
in order to treat them literally. -
sorry, find what is to broad, use :
(\[(combobox) (".+?")\])
-
Hello Ekopalypse ,
okay, I’ve tried a completely wrong path.
1447 replaces in less than 1 second - I’m happy :-)Thanks al lot for you help.
-
Hello, @knowledge-base, @ekopalypse,
I was away from the N++ community since more than a month ( see my post below )
https://community.notepad-plus-plus.org/post/47895
So, just for info ! The @ekopalypse solution can even be shortened :
FIND
combobox( ".+?"\])
REPLACE
group\1.combobox
Best Regards,
guy038