I have a string, say \'123\', and I want to convert it to the integer 123.
\'123\'
123
I know you can simply do some_string.to_i, but that
some_string.to_i
This might work:
i.to_i if i.match(/^\d+$/)