I have a tab delimited text table
there are various columns, 1 column contains a 150 character text string, this string contains various data I would like to extract using regex:
UK post code,
the task is to create VBA regex code that finds the various data elements in the string - it has to be a regex because the string is not structured
string often contains 2 web addresses - the once including "hotfrog" should not be matched
I want to use the code on Windows & PC in Excel 2007, Access 2007, etc
more sample data in attached zip
Postcodes: EX2 5JL, BS1 6AA, LE3 3AH - strructure can vary
web addresses: http ://[url removed, login to view], http ://[url removed, login to view], http ://[url removed, login to view] .uk
Note they sometimes contain spaces that need to be removed
fax: f: +44 1392 209510
telephone: p: 0117 9304075
county: DEVON, Gloucestershire, leicestershire, Dorset
These can't be found by regex - but there is a limited list of possible UK county names - see e.g. wikipedia
<colgroup> <col style="WIDTH: 637pt; mso-width-source: userset; mso-width-alt: 31049" width="849" /></colgroup>
| Minerva House Pynes Hill Business Park, Exeter, DEVON EX2 5JL. f: +44 1392 209510. http ://350.com. Email - None Supplied ... [url removed, login to view] - |
| Beckett Hall St Thomas Street, Bristol, Gloucestershire BS1 6AA. p: 0117 9304075 f: 0117 9292575. http ://www.375.co.uk. Email - None Supplied ... [url removed, login to view] - |
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):
a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.
b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.
3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).
Windows 7, Office 2007 VBA