Jason Stallard
Jason Stallard

Reputation: 348

Notepad++ highlight occurrences between tags

I want to copy all occurrences of a particular key in a .reg file. e.g.

[HKEY_LOCAL_MACHINE\SOFTWARE\PatchInstaller\201506291458.15] 
"Title 1"="HotFix 2.3" <br/>"Notes"=""  

[HKEY_LOCAL_MACHINE\SOFTWARE\PatchInstaller\201506291458.38]
"Title 1"="HotFix 2.4"  <br/>"Notes"=""

[HKEY_LOCAL_MACHINE\SOFTWARE\PatchInstaller\201506291459.1]
"Title 1"="HotFix 2.5"  <br/>"Notes"=""

Though tle 1"="(.*)" finds what I want, I need to exclude the surrounding quotes from being highlighted.

Upvotes: 1

Views: 49

Answers (1)

Wiktor Stribiżew
Wiktor Stribiżew

Reputation: 627419

To only match the characters other than a double quote after Title 1"=", you can use the negated character class [^"]+ and use the \K operator before it:

Title 1"="\K[^"]+

enter image description here

The \K operator just omits the whole text matched so far. So, the match text only contains what is matched with [^"]+.

Upvotes: 1

Related Questions