in reply to Regexp oddity
If you make the last parenthesized match non-greedy by removing the trailing question mark, you can leave out the final $.
I recommend using a line like the following to show what you've captured, just in case you have whitespace: print "1: ->$1<-\n2: ->$2<-\n3: ->$3<-\n";
|
|---|