?
Solved

How to find patterns..?

Posted on 2003-03-04
1
Medium Priority
?
140 Views
Last Modified: 2010-05-18
I want to be able to convert Name fields of this format:
"Hey Christmas Puppets (050101_020_01) hey again"

I want have it look for everything between () and do this..

Into:
Name: Hey Christmas Puppets
TESTSET: 050101
TESTPLACE: 020_01

Any Suggestions..
0
Comment
Question by:sdesar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
sellison earned 80 total points
ID: 8068010
Public Sub Foo(strInput as String)
Dim strName as String
Dim strTestSet as String
Dim strTestPlace as String

strName = Left$(strInput, Instr$(1, strInput, "(") - 1)
strTestSet = Mid$(strInput, Instr$(1, strInput, "(") + 1, Instr$(1, strInput, "_") - 1)
strTestPlace = Mid$(strInput, Instr$(1, strInput, "_") + 1, Instr$(1, strInput, ")") - 1)

End Sub


Not sure exactly if this is what you are trying to do or not.  If not, can you clarify a bit?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question