From: Robert Linder Date: 2002-09-27T15:15:37+09:00 Subject: RE: String gsub last '/\\%[0-8a-fA-F][0-8a-fA-F]/ match does not sub Me , Dummy. I was thinking of Hex ranges, not base 10 Thanks robert_linder_2000@yahoo.com 908-319-0122 -----Original Message----- From: Ryan Davis [mailto:ryand@zenspider.com] Sent: Friday, September 27, 2002 1:39 AM To: ruby-talk ML Subject: Re: String gsub last '/\\%[0-8a-fA-F][0-8a-fA-F]/ match does not sub On Thursday, September 26, 2002, at 07:13 PM, Robert Linder wrote: > I am using string.gsub to replace "/%[0-8a-fA-F][0-8a-fA-F]/" with "_". ... > The following gsub is what I would need to use in a program > > "Simple+SNMP+%28s2nmp%29".gsub( /%[0-8a-fA-F][0-8a-fA-F]/ , "_" ) > ---> "Simple+SNMP+_s2nmp%29" Why would it replace %29? your matching 0-8, not 0-9.