>>497
str = "http://example.com/a-sx-s.png";
print( str.index( "-s" ), str.rindex( "-s" ) )
#=> 20 23
str = str[:23]+''+str[25:]
print( str )
#=> http://example.com/a-sx.png