How to match and replace space in the content between opening "(-" and closing "-)" in javascript with double hypens "--"?
Example:
input: (-A room without books-) (-is like a body without a soul-)
output: (-A--room--without--books-) (-is--like--a--body--without--a--soul-)
example:
"-A room without books-".replace(/\040/g, "--")