parseInt("column5".slice(-1), 10);
You can use -1 or -2 for numbers from one to two digits, respectively.
If you want to specify any length, you can use the following to return the numbers:
parseInt("column6445".match(/(\d+)$/)[0], 10);
The above will work for any length of numbers if the line ends with one or more numbers
source
share