function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

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
Link to Back End Order Details   

PAYMENT METHOD: PayPal Standard 
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,
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...:)
Hi You may use below code snippet to find things like :

Pattern datePatt = Pattern.compile("(Date Ordered:)(.*)(http:)"); ... Matcher m = datePatt.matcher(dateStr); if (m.matches()) { String date = ( };

and so on, but you email needs to be exactly in this same format, so that you may find the starting and ending strings.