ok, its really working this time. Had to use a RexExp object to replace to work as intended