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 aroundoption -
Check the
Regular expressionoption -
Click on the
Replace Allbutton
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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login