[AccessD] Extract Strings from Long Test String

Drew Wutka DWUTKA at Marlow.com
Thu Jul 10 18:36:56 CDT 2008


They don't call me code body for nothing! ;)

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Darryl
Collins
Sent: Thursday, July 10, 2008 5:59 PM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Extract Strings from Long Test String


Nice... :)

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Drew Wutka
Sent: Thursday, 10 July 2008 6:04 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Extract Strings from Long Test String


Assuming strField is that data:

Dim strArray() as String
strArray=Split(mid(strField,2,len(strfield)-2),"]/[")

strArray is now an array with each element being the data between the
brackets.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hewson, Jim
Sent: Wednesday, July 09, 2008 11:53 AM
To: Access Developers discussion and problem solving
Subject: [AccessD] Extract Strings from Long Test String

I'm trying to extract several components from a text string. The string
was created from a legacy system download into Excel. The text string is
located in one field of a table that was imported into the database.
The string is called a "Full Path" because it represents the location
where the data was located in the legacy system.  Each import could have
several thousand rows.

Below are samples of the field (watch wrap):
[LH
DMSP]/[AN/FMQ-7]/[7361002-2]/[7361799]/[7361795]/[953]/[7953200]/[795320
7]/[1N756A]
[LH
DMSP]/[AN/FRR-95]/[317400]/[317359]/[624459]/[317298-1]/[PTM15-1.5D]/[23
5-7053P334]
[LH MWD]/[AN/FPS-123 (V)
1]/[957157-1]/[953252-1]/[584786-1]/[STM5-24]/[586371-5]
[LH SCS]/[AN/FPS-85]/[2054300-0501]/[Receiver]/[No Number
(F20)]/[2052660-0502]/[2018219-0501]/[2020306-0501]/[2055347-0506]/[2018
880-0001]/[1N752A]

What I need to do is extract the strings between the brackets (i.e. "[",
"]/[","]") for each "Full Path" and be able to use them in queries.
There should be a minimum of five sets and there could be as many 15
sets of brackets.

I have been able to get the first two but after that nothing seems to
work.

Any suggestions?

MTIA

Jim



########################################################################
########

This email transmission contains information from NCI Information
Systems, Inc.
that may be considered privileged or confidential and is intended solely
for the
named recipient.  If you have received this message in error, please
contact the
sender immediately and be aware that the use, copying or dissemination
of this
information is prohibited.

########################################################################
########
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
The information contained in this transmission is intended only for the
person or entity to which it is addressed and may contain II-VI
Proprietary and/or II-VI Business Sensitive material. If you are not the
intended recipient, please contact the sender immediately and destroy
the material in its entirety, whether electronic or hard copy. You are
notified that any review, retransmission, copying, disclosure,
dissemination, or other use of, or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited.


--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

This email and any attachments may contain privileged and confidential
information and are intended for the named addressee only. If you have
received this e-mail in error, please notify the sender and delete this
e-mail immediately. Any confidentiality, privilege or copyright is not
waived or lost because this e-mail has been sent to you in error. It is
your responsibility to check this e-mail and any attachments for
viruses.  No warranty is made that this material is free from computer
virus or any other defect or error.  Any loss/damage incurred by using
this material is not the sender's responsibility.  The sender's entire
liability will be limited to resupplying the material.

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
The information contained in this transmission is intended only for the person or entity to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive material. If you are not the intended recipient, please contact the sender immediately and destroy the material in its entirety, whether electronic or hard copy. You are notified that any review, retransmission, copying, disclosure, dissemination, or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited.





More information about the AccessD mailing list