My String: Adam is here
I want that string to turn into this:
Adam is here
Basically, replace any single but leave multiple ones untouched
Tried: (and naturally - no worky
txt.replace(/( ){1}/g,'Adam is here')
txt.replace(/[^]( ){1}[;]/g,'Adam is here')
Any suggestions on how to accomplish this - I presume in regex?
This post has been edited by scottyadam: 11 December 2012 - 04:57 PM

New Topic/Question
Reply


MultiQuote





|