示例#1
0
 function parse_string($string)
 {
     if (preg_match(sprintf('/^(%s)\\s*(.*)$/s', CSS_STRING1_REGEXP), $string, $matches)) {
         $value = $matches[1];
         $rest = $matches[2];
         $value = CSS::remove_backslash_at_newline($value);
         return array($value, $rest);
     }
     if (preg_match(sprintf('/^(%s)\\s*(.*)$/s', CSS_STRING2_REGEXP), $string, $matches)) {
         $value = $matches[1];
         $rest = $matches[2];
         $value = CSS::remove_backslash_at_newline($value);
         return array($value, $rest);
     }
     return array(null, $string);
 }