replace / character after speciffic word
-
Hello to everyone.
Can someone please help me achieving this in notepad++ :from this
url://dns1:8080/get.php?username=pablo/abcdxx&type=m3u
url://dns7:8080/get.php?username=nadia/werdftd&type=m3u
url://dns3:8080/get.php?username=sofia/aduduew&type=m3uto this
url://dns1:8080/get.php?username=pablo&password=abcdxx&type=m3u
url://dns7:8080/get.php?username=nadia&password=werdftd&type=m3u
url://dns3:8080get.php?username=sofia&password=aduduew&type=m3uthat would be to replace “/” (found after word “username=” and before word “&type”) with “&password=” in all lines.
thank you
-
Hello, @vio-vio and All,
Here my solution :
-
Open the Replace dialog (
Ctrl + H
) -
Uncheck all box options
-
SEARCH
/(?=\w+&type)
-
REPLACE
&password=
-
If necessary, check the
Wrap around
option -
Check the
Regular expression
option -
Click on the
Replace All
button
I assume that all the passwords are only composed of letters, as shown in your example. If not, just tell me which non-letters chars may be part of a password !
You may also try this second search expression which allows any char, other than the
/
and the EOL characters, as password char !- SEARCH
/(?=[^/\r\n]+&type)
Best Regards,
guy038
-
-
@guy038 said in replace / character after speciffic word:
/(?=[^/\r\n]+&type)
Thank you very much.work as needed.
no,i don’t think other then words/numbers in password are used. just to make sure added some and used second option,worked as needed to.
Thank you again,this topic can be closed.