Page 1 of 1

Find & Open file

Posted: Wed Mar 26, 2003 12:53 am
by Guest
I'm trying to work out how to create a tool that allows me to look for a file with the name based on the selected word. By using find (cygwin) with the parameters:

C:/src -name $SelWord.java

I can capture following the result in the output:

C:src/com/blah/event/MyFile.java

At the moment I'm trying to work out how to write the regular expression to match the output so I can open that file.

Firstly, is there are better alternative to search and open a file. Secondly, help with the regular expression would be good...otherwise I'll need to read the docs.

Posted: Wed Mar 26, 2003 1:05 am
by Guest
Well, I know the regular expression is:

^\([^(]+\)


But I still want to know if there's a better way to do this.