1) To remove Square Brackets in string: ‘[1,2,3]’.gsub(/[\A\[\]\z]/,”) ingredients: /[ => start tag ]/ => end tag \A => start of line \z => end of line \[, \] => syntax for special characters opening and closing bracket 2) Replacing multiple…
1) To remove Square Brackets in string: ‘[1,2,3]’.gsub(/[\A\[\]\z]/,”) ingredients: /[ => start tag ]/ => end tag \A => start of line \z => end of line \[, \] => syntax for special characters opening and closing bracket 2) Replacing multiple…