I have sample strings and want to replace the lead #with =s. (First two lines) But in string.gsub!(/^#+\w/, "")I cannot get the number #I want to replace.
In javascript, I could use the callback function using the method replace, but how can I archive this Ruby?
##Command-line Tool
###Installment
This is a '#'.
Expected Result:
==Command-line Tool
===Installment
This is a '#'.
source
share