in reply to Perl Regexp help w/ grep
The . matches any character. The * matches the previous character 0 or more times and the ? keeps it from being too greedy (well in concert with * that is) So it matches the shortest amount possible not the longest.#the following is untested. my @local_files = grep /^$id.*?_arbv_/i, readdir LOCALDIR;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Perl Regexp help w/ grep
by revdiablo (Prior) on Oct 14, 2005 at 19:00 UTC | |
by duff (Parson) on Oct 15, 2005 at 03:52 UTC |