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"
Shravan VishwanathanAsked:
Who is Participating?
 
Rgonzo1971Commented:
HI,

pls try
Find what
<PARA APPLIC=".*?ST2.*?"><XREFEXT DATAREF=".*?" PARTTYPE="FIGURE" XIDTYPE="GRAPHIC"\/><\/PARA>

Open in new window

With Regular exception untick .Matches newline

REgards
0
 
Rgonzo1971Commented:
A solution
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.