TIL, 2017-07-18
- You can split every x characters with
scan
:
>> "abcd1234beefcakexyz".scan(/.{1,4}/)
=> ["abcd", "1234", "beef", "cake", "xyz"]
load
, notrequire
, to refresh the thing.
scan
:>> "abcd1234beefcakexyz".scan(/.{1,4}/)
=> ["abcd", "1234", "beef", "cake", "xyz"]
load
, not require
, to refresh the thing.