I have this array of array and I want to loop through it and give me every word, but stripped from "@", punctuation and hashtags. However my regular expression is removing some of the words completely from the array and I am not sure why.
[ [ '@AIMEEE94x',
'@Arsenal_Geek',
'@Charlottegshore',
'shut',
'it',
'ha' ],
[ '"You',
'learn',
'so',
'much',
'@MesutOzil1088',
'and',
'@Alexis_Sanchez"',
'-',
'@alexiwobi:' ] ]
var regex = /\w+/g;
var listsb = [];
for ( i = 0 ; i < tweetsA.length; i++) {
for(j = 0; j < tweetsA[i].length; j++){
if (regex.test(tweetsA[i][j])== true){
listsb = listsb.concat(tweetsA[i][j])
}
}
}
console.log(listsb);