ruby split not working properly
Tue, 26 Feb 2013 20:36:48 -0800 Post Comments
Try
something.split('\\')
The backslash is used to escape special characters. In your case to
encode a single quote in the string rather than terminating the string
literal.
IRB is behaving funny because it thinks the string is incomplete, it is
looking for a closing single quote.
The double-backslash encodes as a single backslash in the string.
Gary Wright
something.split('\\')
The backslash is used to escape special characters. In your case to
encode a single quote in the string rather than terminating the string
literal.
IRB is behaving funny because it thinks the string is incomplete, it is
looking for a closing single quote.
The double-backslash encodes as a single backslash in the string.
Gary Wright
