Help for this page
my $dn = 'corpid=xxxxxx,ou=people,o=corp'; my ($ou) = $dn =~ /ou=(.*?),/; print "ou = $ou\n";
Sometimes minimal matching can help a lot. Imagine you’d like +to match everything between "foo" and "bar". Initially, you write somet +hing ... if ( /foo(.*?)bar/ ) { print "got <$1>\n" } got <d is under the >