0
Answer

Rewrite with regular expressions

Jonh Smith

Jonh Smith

14y
10.1k
1

Hi. I have the text:

Disposition: form-data; name="To"

ang <[email protected]>
-----------------------------7da3d81f160588
Content-Disposition: form-data; name="CC"


-----------------------------7da3d81f160588
Content-Disposition: form-data; name="BCC"


-----------------------------7da3d81f160588
Content-Disposition: form-data; name="Subject"

MySubject
-----------------------------7da3d81f160588
Content-Disposition: form-data; name="File"; filename=""<br/>
Content-Type: application/octet-stream


-----------------------------7da3d81f160588
Content-Disposition: form-data; name="cf_loader"

on
-----------------------------7da3d81f160588
Content-Disposition: form-data; name="File"; filename=""
Content-Type: application/octet-stream


-----------------------------7da3d81f160588
Content-Disposition: form-data; name="template_id"


-----------------------------7da3d81f160588
Content-Disposition: form-data; name="Body"

MyBody


I have written code that get information and writes in an KeyValuePair. As follow:

Key - Value
To - ang<[email protected]>
CC - Empty
BCC - Empty
Subject - MySubject
and etc. My code is used of class String for this. I need to use regular expressions, but I do not understand them. Help please. Thanks.