Espressioni regolari
string["text"]# bad
/(first|second)/
# good
/(?:first|second)/# bad
/(regexp)/ =~ string
process $1
# good
/(regexp)/.match(string)[1]# bad
/(regexp)/ =~ string
...
process Regexp.last_match(1)
# good
/(?<meaningful_var>regexp)/ =~ string
...
process meaningful_varLast updated