Answer the question
In order to leave comments, you need to log in
Doesn't split string by delimiter in ruby 2.7.1p83?
It is required to split a string in ruby on the separator "\"
Here is an example of a string:
Server username: DESKTOP-AHDESI\Username
Here's how I try:
user_name = "DESKTOP-AHDESI\Username"
print user_name.split("\\")
I get:
Ruby Error: NoMethodError undefined method `gsub!' for ["DESKTOP-AHDESIUsername"]
Answer the question
In order to leave comments, you need to log in
Slightly late answer:
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question