public static function convertFromCommented($value)
    {
        // check for existing comments
        if (preg_match('/(?:\<!-|-->|\/\*|\*\/|\/\/\W*\w+\s*$)|(?:--[^-]*-)/ms', $value)) {

            $pattern = array(
                '/(?:(?:<!)(?:(?:--(?:[^-]*(?:-[^-]+)*)--\s*)*)(?:>))/ms',
                '/(?:(?:\/\*\/*[^\/\*]*)+\*\/)/ms',
                '/(?:--[^-]*-)/ms'
            );

            $converted = preg_replace($pattern, ';', $value);
            $value    .= "\n" . $converted;
        }

        //make sure inline comments are detected and converted correctly
        $value = preg_replace('/(<\w+)\/+(\w+=?)/m', '$1/$2', $value);
        $value = preg_replace('/[^\\\:]\/\/(.*)$/m', '/**/$1', $value);
        $value = preg_replace('/([^\-&])#.*[\r\n\v\f]/m', '$1', $value);
        $value = preg_replace('/([^&\-])#.*\n/m', '$1 ', $value);
        $value = preg_replace('/^#.*\n/m', ' ', $value);

        return $value;
    }
public static function convertFromCommented($value)
    {
        // check for existing comments
        if (preg_match('/(?:\<!-|-->|\/\*|\*\/|\/\/\W*\w+\s*$)|(?:--[^-]*-)/ms', $value)) {

            $pattern = array(
                '/(?:(?:<!)(?:(?:--(?:[^-]*(?:-[^-]+)*)--\s*)*)(?:>))/ms',
                '/(?:(?:\/\*\/*[^\/\*]*)+\*\/)/ms',
                '/(?:--[^-]*-)/ms'
            );

            $converted = preg_replace($pattern, ';', $value);
            $value    .= "\n" . $converted;
        }

        //make sure inline comments are detected and converted correctly
        $value = preg_replace('/(<\w+)\/+(\w+=?)/m', '$1/$2', $value);
        $value = preg_replace('/[^\\\:]\/\/(.*)$/m', '/**/$1', $value);
        $value = preg_replace('/([^\-&])#.*[\r\n\v\f]/m', '$1', $value);
        $value = preg_replace('/([^&\-])#.*\n/m', '$1 ', $value);
        $value = preg_replace('/^#.*\n/m', ' ', $value);

        return $value;
    }
public static function convertFromCommented ( $ value ) { // check for existing comments if ( preg_match ( '/(?:\<!-|-->|\/\*|\*\/|\/\/\W*\w+\s*$)|(?:--[^-]*-)/ms' , $ value ) ) { $ pattern = array ( '/(?:(?:<!)(?:(?:--(?:[^-]*(?:-[^-]+)*)--\s*)*)(?:>))/ms' , '/(?:(?:\/\*\/*[^\/\*]*)+\*\/)/ms' , '/(?:--[^-]*-)/ms' ) ; $ converted = preg_replace ( $ pattern , ';' , $ value ) ; $ value .= "\n" . $ converted ; } //make sure inline comments are detected and converted correctly $ value = preg_replace ( '/(<\w+)\/+(\w+=?)/m' , '$1/$2' , $ value ) ; $ value = preg_replace ( '/[^\\\:]\/\/(.*)$/m' , '/**/$1' , $ value ) ; $ value = preg_replace ( '/([^\-&])#.*[\r\n\v\f]/m' , '$1' , $ value ) ; $ value = preg_replace ( '/([^&\-])#.*\n/m' , '$1 ' , $ value ) ; $ value = preg_replace ( '/^#.*\n/m' , ' ' , $ value ) ; return $ value ; }
Check for comments and erases them if available

@param string $value the value to convert

@static
@return string
Check for comments and erases them if available