Use that and $match will contain the slash prior to "browse" and everything following up to and including the final slash.
Be forewarned, that will break if you give it a string ending in a directory that you want to match but which doesn't have a slash. The string 'http://foo.bar.com/some/path/browse/ASP/scripts', for example, would cause $match to be set to '/browse/ASP/'. If that's alright, then great. If not, they you have to find another way of distinguising a file and a directory. (Perhaps all of your files contain a dot and none of your directories do.)
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: regex help
by sauoq
in thread regex help
by andrew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |