You need to sign in to do that
Don't have an account?
LALALA
Hard Regex Help
I am a new for the regex, so can any good people can help me answer these question? thanks....
this is my email:
Order Number: 2000157
Date Ordered: Wednesday, May 21, 2014
http://www.ggfoee.com/orderdetails.aspx?orderid=2000157
Link to Back End Order Details
CUSTOMER ROLE: Parent
PAYMENT METHOD: PayPal Standard
PAYMENT STATUS: Pending
PO URL: No Purchase Order File Uploaded
PO #:
COUPON CODE: No coupon used
No Comment or Instructions Given
Billing Address
Name: lacy mason
Company: Mason Tool & Engineering Ltd
Address: Unit 8/ 66 Hobill Ave,
Wiri
City: Auckland, 2241
State/Province: North Island, Ireland
Phone: 021735562
My question is:
How to use regex get those info?: Date ordered, Payment Method, Payment Status, Name, company name, Address and Phone number.
you don't need answer all, just answer what you know it. thank you again...:)
this is my email:
Order Number: 2000157
Date Ordered: Wednesday, May 21, 2014
http://www.ggfoee.com/orderdetails.aspx?orderid=2000157
Link to Back End Order Details
CUSTOMER ROLE: Parent
PAYMENT METHOD: PayPal Standard
PAYMENT STATUS: Pending
PO URL: No Purchase Order File Uploaded
PO #:
COUPON CODE: No coupon used
No Comment or Instructions Given
Billing Address
Name: lacy mason
Company: Mason Tool & Engineering Ltd
Address: Unit 8/ 66 Hobill Ave,
Wiri
City: Auckland, 2241
State/Province: North Island, Ireland
Phone: 021735562
My question is:
How to use regex get those info?: Date ordered, Payment Method, Payment Status, Name, company name, Address and Phone number.
you don't need answer all, just answer what you know it. thank you again...:)
Pattern datePatt = Pattern.compile("(Date Ordered:)(.*)(http:)"); ... Matcher m = datePatt.matcher(dateStr); if (m.matches()) { String date = (m.group(2) };
and so on, but you email needs to be exactly in this same format, so that you may find the starting and ending strings.