How Do I Strip White Space When Grabbing A Text()
I have the following jquery statement. I wish to remove the whitespace as shown below. So if I have a word like: For example '#wordOperating System/test' I would like the end
Solution 1:
Try the global g
modifier:
.replace(/ /g, '')
Same goes for your slash replacement (in case there are multiple /
s in your string):
.replace(/\//g, '\\/')
Post a Comment for "How Do I Strip White Space When Grabbing A Text()"