Timeline for String of alphanumeric characters to a sorted list of comma-separated ranges
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 21, 2014 at 8:58 | vote | accept | Andrew Cheong | ||
Feb 11, 2014 at 22:05 | history | edited | Paul Prestidge | CC BY-SA 3.0 |
fixed ideone link
|
Feb 11, 2014 at 21:49 | history | edited | Paul Prestidge | CC BY-SA 3.0 |
fixed a bug with two-character ranges, +8 chars
|
Feb 11, 2014 at 9:15 | comment | added | Paul Prestidge | @Howard Great suggestions, thanks! | |
Feb 11, 2014 at 9:13 | history | edited | Paul Prestidge | CC BY-SA 3.0 |
Implemented Howard'
|
Feb 11, 2014 at 7:36 | comment | added | Howard |
Note that gsub(/[]/i) is shorter than tr(''.upcase) by 2 characters. Moreover, scan(/.+/) -> split saves 5, and $><< instead of puts another one.
|
|
Feb 11, 2014 at 4:23 | history | edited | Paul Prestidge | CC BY-SA 3.0 |
change the other \w to a ., -1 char
|
Feb 11, 2014 at 4:12 | comment | added | daniero | +1 For one-liner. Very clever use of various methods; This is really brilliant. | |
Feb 11, 2014 at 1:31 | history | edited | Paul Prestidge | CC BY-SA 3.0 |
Using newlines as the "blank" character, -2 chars
|
Feb 11, 2014 at 1:07 | history | edited | Paul Prestidge | CC BY-SA 3.0 |
fixed the output when A or Z are not included in the string, +3 chars
|
Feb 11, 2014 at 0:48 | history | answered | Paul Prestidge | CC BY-SA 3.0 |