Solved

Regular Expression required

Posted on 2006-10-23
7
175 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
  • 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now