in reply to Re: file$name.class find - regexp ?
in thread file$name.class find - regexp ?

Thanks for your reply...sorry it should be class.
But I guess my question is I know the base file name 'testfile.class'. I need to find if there are any other files exists in the directory with a $ sign in between of testfile.class. $ can come anywhere...
like, I know testfile.class and I want to any related files like test$file.class or testfi$le.class exists in the same directory...
Thanks bunch..

Replies are listed 'Best First'.
Re^3: file$name.class find - regexp ?
by JavaFan (Canon) on Sep 27, 2008 at 02:01 UTC
    As I said, look at each file in the directory. If it contains a '$', remove it. If the result equals 'testfile.class', the original was 'testfile.class' with a '$' somewhere in it.
Re^3: file$name.class find - regexp ?
by AnomalousMonk (Archbishop) on Sep 27, 2008 at 07:55 UTC
    You still haven't answered JavaFan's original question: will the '?' character be inserted into the string, leaving all the other characters and simply changing some of their offsets in the string, or may the '?' replace one of the other characters in the string, or both?

    In the first case, the answer is fairly straightforward, and JavaFan has given it to you. In the other cases, the problem is a bit more complex.

    Can you please be more specific about your exact problem?