Solved

Regular Expression required

Posted on 2006-10-23
7
180 Views
Last Modified: 2010-04-30
Hi

I have a desktop search app that supports the use of Regular Expresssions

For example I can use

Shell ("C:\Program Files\2BrightSparks\FindOnClick\FindOnClick.exe -pathregex " & Chr$(34) & "c:\\[a-j]")

To run the app and search for all files on C: that begin with a-j (pretty useless I know, but this is the example frovided)

What I am trying to do is to search files on C:\ that contain a text string of say "text" and I have not got the faintest idea of how Regular Expressions work. I don't know that this is the right place to post this either.

Thanks
0
Comment
Question by:martmac
[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
  • 2
7 Comments
 
LVL 16

Accepted Solution

by:
ThinkPaper earned 168 total points
ID: 17789119
take a look at these links
http://visualbasic.about.com/od/usingvbnet/l/blregexa.htm
http://authors.aspalliance.com/brettb/VBScriptRegularExpressions.asp

In this case your patter would simply be:

.Pattern = "test"
0
 
LVL 8

Assisted Solution

by:PatG042800
PatG042800 earned 166 total points
ID: 17790270
I don't use regular expressions all the time but when I need to I have found this tool to be very useful. After looking at the above links also check out the Regex Coach.

http://www.weitz.de/regex-coach/

This little program will let you enter your regex, process it against a text string and highlight in real time what type of matching you will get.
0
 
LVL 14

Assisted Solution

by:Shiju Sasidharan
Shiju Sasidharan earned 166 total points
ID: 17818159
0
 
LVL 8

Expert Comment

by:PatG042800
ID: 18024800
I think all replies were relevant to the question.
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

696 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