The resolution: function splitString():void{ var rtaString:String = myRTA.text; var pattern:RegExp = /\b[A-Za-z0-9'-]+\b/gi; var result:Array = new Array(); var temp:Array; temp = pattern.exec(rtaString); while (temp != null) { result.push({position:temp.index, word:temp}); trace (temp.index, temp); temp = pattern.exec(rtaString); } myDGrid.dataProvider = result; }