I'm a new user of Notepad ++ and I need your help. I have several pages templates using shortcodes like this:

[div] Block Text1 [/div]
[div] Block Text2 [/div]

I'd like to find a fast way to paste various text for each template.

Text 1 will go to Block Text1
Text 2 will go to Block Text2, etc

Any fast tricks you recommend to: 1/ Select only Block Text1 without the '[div]' 2/ Replace with the second text?

Thanks a lot!

  • Could you clarify what the file looks like before, and how you want it to look after? I think what you're trying to do is possible but it's not quite clear exactly what your goal is. – nhinkle Oct 6 '13 at 1:19
  • I'm sorry, I was not clear it's the first time I'm using the editor here! So now I hope it's better? I have edited the question. – user260187 Oct 6 '13 at 1:29
  • I'm still not entirely sure what you're trying to do, but Notepad++ can do search-and-replace with regular expressions, so that's probably the route you want to go. – nhinkle Oct 6 '13 at 1:51

I'm a former Notepad++ Contributing Developer. Notepad++ does not have this feature as of yet. It's supposedly "in the works"™ You can use Find and Replace like this:

Find: [div1]*[/div1]
Replace: [div1]code whatever[/div1]

That is really the only option I can think of.

  • thanks a lot! Do you think I can use macro and replace each time with a different text? – user260187 Oct 6 '13 at 2:10
  • @user260187 check out this post: stackoverflow.com/questions/362444/… (PS: if my answer is the solution to your question, mark it as the answer :) ) – Adovi Oct 6 '13 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.