Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

substring replace in ruby

user_input = "mooventhan" 
user_input.gsub!(/moo/, "hel")
print user_input
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #substring #replace #ruby
ADD COMMENT
Topic
Name
4+1 =