Actionscript Guru I need your help.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • qw12er
    Confirmed User
    • Apr 2004
    • 799

    #1

    Actionscript Guru I need your help.

    can someone explain to me why this function doesn't replace "<![CDATA[" in the string s ?

    Code:
    public static function trim(s:String):String {
    	s = s.replace(/&lt;![CDATA[/g, "");
    	s = s.replace(/<![CDATA[/g, "");
    	s = s.replace(/]]&gt;/g, "");
    	s = s.replace(/]]>/g, "");
    	s = s.replace(/^([\s|\t|\n]+)?(.*)([\s|\t|\n]+)?$/gm, "$2");
    	return s;
    }
    I'm kind of out of ideas...
    I have nothing to advertise ... yet.
  • fris
    Too lazy to set a custom title
    • Aug 2002
    • 55679

    #2
    are you trying to just strip cdata tags?
    Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.

    Comment

    Working...