/usr/local/bin is a special case of /usr/*anydir*/bin so the various answers you were given in the CB would do the job. Here's one:
$path =~ m~^/usr (?: (?:/[^/\0]+|\\/)+ )? /bin~x;
that uses elements of my and tye's CB answers.
In reply to Re: dir match, dir may or may not appear
by GrandFather
in thread dir match, dir may or may not appear
by hellosarathy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |