In JavaScript, it would be:
var x = description.replace(/\s/g,
I'm thinking there is a "Replace" function in VBScript, and that might be an easier solution in this case?
Main Topics
Browse All TopicsCan someone please de-mistyfy regular expressions for me?
i have a string with any number of space characters in it, and i want them all, indevidually replaced with a " "...
eg, where plusses are spaces, not plusses
"10+2++3" would be "10 2 3"
this is my code :
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
er none of them seem to work for propperly for me.
description = "12x10 print glossy "
Replace(description, " ", " ") gives :
"12x10 print glo
and in js,
var x = description.replace(/\s/g,
"12x10 print glossy "
when i need
"12x10 print &nb
it only seems to replace the single space string... ?
madprogramme:
What if there are 5 spaces? Or 6? Or 4,567?
In that case, either a loop (worst) or a regex (best) is the solution.
I'd supply it, but my VBScript is not up to snuff. JavaScript, no problem (http:#a25233626).
Business Accounts
Answer for Membership
by: evilrixPosted on 2009-09-01 at 09:50:10ID: 25233456
The \s meta character will match any white space ions.info/ reference. html
http://www.regular-express