Solved

Regular Expression required

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

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

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…

856 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