Displaying 1 result from an estimated 1 matches for "4zgher1s3uj".
2012 Sep 30
3
How to escape a forward slash with gsub, also does interpolation work with gsub?
I am trying this:
I want to replace all the text in between java comments:
/* start */
replace this text here
/* end */
I''m trying:
text.gsub(//* start */(.*)/* end *//im, replace_with)
But i''m getting errors relating to expecting keyword_end.
How should I be escaping /* and */ ?
Also, does string interpolation work in gsub regex? Say I had variables
like:
start_tag =