http://qs321.pair.com?node_id=1152541


in reply to Re^2: dir match, dir may or may not appear
in thread dir match, dir may or may not appear

Yes, see perlre. If one expression is too difficult, why not use two?

If you really need to write it in one expression, use a group and quantify that:

m!^/usr(?:/[^/]+)?/bin!;