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

hellosarathy has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

How do I match:

/usr/bin /usr/local/bin /usr/*anydir*/bin *anydir* may or may not appear? my regexp: $path =~ m|^/usr/(/[^/]+{0,1})/bin/| reports syntax error.