append text to some lines only
-
hi great community,
i need to append text to some lines only. this is an example of my document:
#EXT2836, https://blabla #EXT392, https://blgahsa #EXT9161, https://aggloi need to append text to https line only, like this one:
#EXT2836, https://blabla66666 #EXT392, https://blgahsa66666 #EXT9161, https://agglo66666i know how to append text to all lines with:
find:$
replace:66666but this regex append text to all lines. i need to append text only to https lines
so, i need help on replace field:
find:(?-s)https://.*
replace:66666(need help here) -
Hi @namx3249,
a simple way I can think of:
Find:^https.*\K
Replace with:66666\Kresets the starting point of the reported match, then you can just type the appended text in the Replace field.The setting
. matches newlinein the Replace dialog is unchecked. -
oh yes, work fine. thank you
this option
\Kit’s really new for me. thanks again for your tip -
Note that
\Kis only going to work if you’re doing a Replace All.
It won’t work with a step-by-step Replace. -
yes Alan, i’ve see that !
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