Re: Regular Expression question




"(13)"[0] = "("
"(13)"[1] = "1"
"(13)"[2] = "3"
"(13)"[3] = ")"

"(13)"[-1] = ")"
"(13)"[-2] = "3"
"(13)"[-3] = "1"
"(13)"[-4] = "("

"-N" counts from the end, starting with -1.


Thanks. An the .. in [1..-2] means "keep everything in between" ?


--
Posted via http://www.ruby-forum.com/.

.