From: Hans Mackowiak Date: 2012-10-16T16:38:46+09:00 Subject: Re: Drop 1st and last particular character or both regexp combined: "#hit#here#".gsub(/(^#)|(\#$)/,'') #=> "hit#here" -- Posted via http://www.ruby-forum.com/.