4 Replies Latest reply on Jan 15, 2011 5:17 PM by Haakenlid

    Regexp for removing object character code? [JS CS4]


      I've got a routine that makes a list of headlines & sorts them, which ends up as bookmarks. When a headline contains an anchored object, the resulting text includes a glyph, a tiny dotted box with 'OBJ' in it, which looks bad in the final list of bookmarks. Using string.charAt(x) for the character returns 65532.


      I suppose I could write a function that loops through the sentence's characters & discards any 65532, but that seems like overkill if there's a regexp replace string. I already run string.replace(/\s+/g, " ") to replace non-space invisible ctrl characters w/space, but that pattern doesn't affect the object character. Does this ring a bell with anyone?