Question

I have this HTML part :

<a href="http://always-same-path.to/my/file.pdf">Random reference</a>

This line exists in a lot of files.

I need to replace it with :

Random reference <lots>of tags</lots>

The usual regex (Ctrl + F) works well. Unfortunately, the replacement text is way too long and can't be used in the usual regex, so I used TextFX's advanced Search and replace plugin.

This is my find:

<a href="http://always-same-path.to/my/file.pdf">(.+)</a>

This is my replace:

\1 <lots>of tags</lots>

Finding works (i.e. the line is highlighted) Replacing, however, doesn't. I get this instead :

<lots>of tags</lots>

Those options are checked in the Find/replace window:

  • Regular Expr
  • Autograb Find Text
  • Wrap

Thanks in advance

Was it helpful?

Solution

Same issue for me, but resolved!

I just used in the replace field $0 and it worked !

My Notepad++ version: v6.1.5 UNICODE (just updated! - I would suggest you to do the same)

File format I'm working on: .srt (movie subtitles)

"Find What" field: ^\d+$ [matching line with just a number]

"Replace with" field: ----- $0 ------

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top