Jonh Smith

Jonh Smith

  • NA
  • 1
  • 10.1k

Rewrite with regular expressions

Nov 6 2010 3:07 PM

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.