9 Replies Latest reply on Mar 26, 2007 3:22 PM by Lukewig

    Confused with regual expressions

    wgb14 Level 1
      Hi all,

      Many many thanks for your help so far. This is one more question

      I am trying to contruct a regula expression that will remove from a text inpu ttwo characters: a) any panctuation (? commas, etc) b) remove any white space at the end of the line. This is what i have so far:

      on mouseDown (me)
      m = sprite(me.spriteNum).member
      re ="(/\s+$/ +\W)" -- regexpression describing what you want to remove
      m.text = RegExp_Replace(m.text, re, " ", "g")
      end

      Nothing seems to happening! Any ideas what is wrong with it? I suspect that something must be wrong with the regular expression itself (i am completely new at these regular expressions)

      Many thanks