Avatar of Shravan Vishwanathan
Shravan Vishwanathan

asked on 

Match all lines matching a string in Notepad++

I have a string which I need to find in all XML files. I am using notepad ++.

String:

<PARA APPLIC="ST2, LT5"><XREFEXT DATAREF="LRCS000005678" PARTTYPE="FIGURE" XIDTYPE="GRAPHIC"/></PARA>

Open in new window

I need to find all files which contain 'ST2' in PARA APPLIC and PARA element should be followed by XREFXT element with XIDTYPE="GRAPHIC"

Example:


<PARA APPLIC="XXX,"ST2","XXX"> followed by <XREFXT DATAREF="XXXXXXXXXXX" PARTTYPE="FIGURE" XIDTYPE="GRAPHIC"/></PARA>

Open in new window

'X' represents wild character.

ST2 can be anywhere places in the APPLIC example:

APPLIC="ABC, "ST2", "RT4"
APPLIC="ST2", "GHT", "HYT"
APPLIC="HYT", "ST2"
* Notepad++XMLRegular Expressions

Avatar of undefined
Last Comment
Rgonzo1971

8/22/2022 - Mon