Blog Archives

Regular Expressions

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

Tagged with:
Posted in Ruby on Rails
StackOverFlow
Categories
Archives