I have this string for example:
str = \"my name is john#doe oh.yeh\";
the end result I am seeking is this Array:
strArr = [\'my
This works:
array = string.replace(/#|\./g, ' &$&').split(' ');
Take a look at demo here: http://jsfiddle.net/M6fQ7/1/