The matcher in the code below comes from Erel's Mailparser found here
It fails to find the filename "Claim_M312764.ini" in the headers
Regex is a weakness of mine and though I have been reading tutorials about it, I still don't know enough to fix it myself.
Any help would be appreciated...
B4X:
Dim headers As String
Dim filename As String
Dim m As Matcher
headers="Content-Type: application/octet-stream; name=Claim_M312764.ini Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=Claim_M312764.ini "
m = Regex.Matcher2("filename=\s*q([^q]+)q".Replace("q", QUOTE), Regex.CASE_INSENSITIVE, headers)
If m.Find Then filename = m.Group(1) Else filename = "attachment"
Msgbox(filename,"Attachment name is")
It fails to find the filename "Claim_M312764.ini" in the headers
Regex is a weakness of mine and though I have been reading tutorials about it, I still don't know enough to fix it myself.
Any help would be appreciated...