I'm not an expert at these things, and you haven't included samples of the raw input and desired output, but I'll take a crack at it. Based on your delimiter strings, I suppose you're trying, first, to reduce your file to only those strings that look like this:
<h5><a href="file/?qwe=queryString">
<span>link text</span></a></h5>
and then further parse them down to something like this:
queryString, link text
I have sometimes wondered how to reduce an HTML file to nothing but its links, and you've pushed me to finally figure this out (thank you!):
Find: (?s).+?(<a .+?</a>|\z)
Replace all with: \1\r
In English, that's, "Ignoring line breaks, look for a link (or the end of the file), preceded by any amount of text. Replace all of it with just the link (or end of file) plus a line break."
To apply this to the specific combination of H5, URL, and span, we can expand the Find string (remembering to escape the URL's question mark with a backslash). Here's one way of doing it:
(?s).+?(<h5><a .*?file/\?qwe=(.+?)".*?<span>(.+?)</span>|\z)
and change the Replace string so it reflects the added pairs of parentheses above:
\2, \3\r
Sure, it leaves a lonely comma on the last line, but it does the job. Whether it's exactly what you need or not, I hope it helps.
- TH