From: Christian Couder Date: 2002-04-24T21:24:14+09:00 Subject: Any global matching function ? Hi, I am trying to do something like perl -e '$_ = "VAR_3 - VAR_1 - VAR_2"; print m/VAR_([0-9])/g, "\n"' -> 312 in Ruby, but I couldn't find a global matching function which returns an array. The best I came with is str = "VAR_3 - VAR_1 - VAR_2" while numbers = /VAR_([0-9])/.match(str) print numbers[1] str = numbers.post_match end Is there a better way ? Thanks in advance. -- Christian.