I have a string as follows
var str = "foobar~~some example text~~this is a string, foobar1~~some example
text1~~this is a string1";
I need to loop through this string and get the text "some example text", "some example text1"
Can any one let me know how to loop through this.