troubleshooting Question

REGEX help

Avatar of Chris Jones
Chris JonesFlag for United States of America asked on
.NET ProgrammingRegular Expressions
5 Comments2 Solutions115 ViewsLast Modified:
I need some help with a bit of REGEX

i need to find the first occurrence of Location in my string

and the last occurrence of total in my string
And pull the Address from the test
and the phone number from the text
what i tried to use to find all of this info while changing out the word to look for.
^(.*?)(\bLocation\b)(.*)$

here is my sample text


Remit To: TEST, Inc |nvoice 031115 065
$386 PO. BOX 1999 invoice DaIe 08/17/16
a o MIDLAND, TX 29345  Due Date 09/16/16
Emmy Services TELEPHONE: (432) 682-1991 Ticket 002151
Bill T0: BLACK MOUNTA'N Please a this amount: 2 076 6
500 MAIN ST. SUITE 500 P y s ’ ' 8
FT. WORTH, TX 76102
Unit Price Tax
Description Qty UM Price Total Amount Total
Work Completed Date: 11l13/2015
Job Number: 15.40.11.0065
Location: 11031112130:wa
Work Description: CHANGED 10HP MOTOR ON PUMP JACK AMPS 7.3-7.1-6.9.
ELECTRICIAN APPRENTICE: GARCIA, MIGUEL ANGEL 8.00 R/l’ 31.00 248.00 13.64 251.64
ELECTRICIAN APPRENTICE; GARCIA. MIGUEL ANGEL 2.00 OIT 46.50 93.00 5.12 9312
JOURNEYMAN ELECTRICIAN; VAN LEER, LARRY WAYNE 8.00 R/T 39.00 312.00 17 16 329.15
JOURNEYMAN ELECTRlCIAN; VAN LEER. LARRY WAYNE 2.00 O/T 58.50 117.00 6.44 123.44
LABOR Subtotal —770.oo _ 4—2‘0‘5 m
8531; 4WD SERVICE TRUCK 1000 HR 3200 320.00 17.60 337.50
EQUIPMENT Subtotal 320.00 17 60 337 60
BOLT 6.00 EA 1.17090 7.03 0.39 7 42
NUT 13.00 EA 0.42782 2.57 0.14 2.71
NUT LOCK STEEL 114 600 EA 0.73500 4.41 0.24 455
TAPE PIPE 1 00 EA 0.91950 9.92 0.55 10.47
TAPE VINYL 3/5 1.00 EA 22.77000 22.77 1 25 2402
NEW 10MOTORNEW1OHP1200RPM 256T—FRAME 1 00 EA 31040000 818.40 45.01 863.41
LUBE PULL PENETRATlNG SPRAY 1.00 EA 13.30500 1331 0 73 14.04
MATERIAL Subtotal 878.41 48,31 925,72
LOCATION Subtotal 1,968.41 108.27 2,076.68
Terms: NET 30
Subtotal 1.968.41
Tax (NMLE) 108.27
Total 2,076.6
Page 1 of 1
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 2 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros