On Vendredi 14 Juin 2002 06:36, Paul Makepeace wrote : > Can someone explain the first result? > $ perl -wle '$_ = "small - medium - large"; > /- (.+?)$/; print $1; > medium - large
The "non-greedy rule" is applied *after* the "leftmost rule", so it will match "medium - large". If you want to match anything but -, say it: /- ([^-]+)$/ => large Jerome -- [EMAIL PROTECTED]