in reply to Re: Regular Expression Assistance
in thread Regular Expression Assistance

This is what I thought it should look like. Unfortunately, when I tested it, I also got stuff that was on the same line as the path I wanted, but was not part of the path itself. For instance, I got:

but you might try looking at /home/monks/thanksforhelping1234567890.ext for help

Any suggestions on how to get rid of the excess stuff?

Replies are listed 'Best First'.
Re: Re: Re: Regular Expression Assistance
by moxliukas (Curate) on Jun 10, 2002 at 13:15 UTC

    I don't really know what is happening at your end, but this seems

    $_ = "but you might try looking at /home/monks/thanksforhelping1234567 +890.ext for help"; $_ =~ /(\/home\/monks\/thanksforhelping\d+\.ext)/; print $1;

    to output:

    /home/monks/thanksforhelping1234567890.ext

    So check for typos... that could be your problem