Given the following strings:
application/pdf; name=a.pdf
application/pdf; name="b.pdf"
application/pdf; name="c.pdf
application/pdf; name=d.pdf"
I need the following values in a capture named “filename”:
a.pdf
b.pdf
c.pdf
d.pdf
The following regex works for a.pdf, but fails for the rest due to the double quotes:
name=(?<filename>.*)
Any suggestions how I can get the rest? Thanks.
Try this one: