Forum Moderators: open
"This is a "BIG"cat."
I want to change that to this
"This is a \"BIG\" cat."
Then I want to do
document.write quotes;
quotes being the variable I save all of this on.
I've been reading about search(), and replace() but dont know how to quite use them to do this trick.
Any suggestions?
var test = 'This is a "BIG" cat';
Using the single quotes means you don't have to escape the double quotes.
FYI: The replace function works as follows:
var test = 'hello mr smith';
test = test.replace('smith','johnson');
This would result in "hello mr johnson"
Regular expressions are a whole different kettle of fish and much more complex. I shouldn't think you'll need them for what you're trying to do.
if you can let us know exactly where and why you need to do what you're doin' perhaps a code snippet, I'm sure one of us'll have the definitive answer.
Josh
This is exactly what I'm trying to do. I posted this on the server-side area of the site. It has to do with server-side languages but ....... well, check it out it will tell you exactly what i'm trying to do.
[webmasterworld.com...]
Thank you all