I want to remove HTML tags from a string. For example assume we have the string:
example ive got a string
How can I wr
You can use the existing split function
One easy and choppy exemple:
var str = ' example ive got a string
';
var substr = str.split(' ');
// substr[0] contains ""
// substr[1] contains "example ive got a string
"
var substr2 = substr [1].split('');
// substr2[0] contains "example ive got a string"
// substr2[1] contains ""
The example is just to show you how the split works.