Solved

Regular Expression required

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

813 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

19 Experts available now in Live!

Get 1:1 Help Now