I want to know whether we can convert from DOS(CR LF) format to UNIX(LF) format in Javascript/JQuery?
In linux/unix, we have a dos2unix
command and I'm looking similar thing in javascript.
Thanks in advance, happy coding :)
I want to know whether we can convert from DOS(CR LF) format to UNIX(LF) format in Javascript/JQuery?
In linux/unix, we have a dos2unix
command and I'm looking similar thing in javascript.
Thanks in advance, happy coding :)
I found answer for my question. Below is the way we can do it in javscript with the help of "string".replace.
the_string.replace(/\r\n/g, "\n")
Thanks everyone, happy coding :)