GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Actionscript Guru I need your help. (https://gfy.com/showthread.php?t=1024897)

qw12er 06-01-2011 08:01 AM

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...

fris 06-01-2011 01:33 PM

are you trying to just strip cdata tags?


All times are GMT -7. The time now is 06:31 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc