I obtain a string after use number = sep[1].scan(/\w+/)
but later I need to compare number with other number. I known when I use sep[1].scan(/\w+/)
I discard other symbols but how convert my string number into a real integer?
The solution for this problem is: with regular expression; number is an array with length 1 so I need to convert number[0] to array, like this: num_integer =number[0].to_i
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With