function x($re, $v, $options = 'si') { while (preg_match('/^\\s*(\\/\\*.*\\*\\/)(.*)$/Usi', $v, $m)) { /* comment removal */ $v = $m[2]; } $this->unparsed_code = strlen($this->unparsed_code) > strlen($v) ? $v : $this->unparsed_code; return ARC2::x($re, $v, $options); }
function x($re, $v, $options = 'si') { $v = preg_replace('/^[\\xA0\\xC2]+/', ' ', $v); while (preg_match('/^\\s*(\\#[^\\xd\\xa]*)(.*)$/si', $v, $m)) { /* comment removal */ $v = $m[2]; } return ARC2::x($re, $v, $options); //$this->unparsed_code = ($sub_r && count($sub_r)) ? $sub_r[count($sub_r) - 1] : ''; }
function x($re, $v, $options = 'si') { $v = preg_replace('/^[\\xA0\\xC2]+/', ' ', $v); while (preg_match('/^\\s*(\\#[^\\xd\\xa]*)(.*)$/si', $v, $m)) { /* comment removal */ $v = $m[2]; } $this->unparsed_code = strlen($this->unparsed_code) > strlen($v) ? $v : $this->unparsed_code; return ARC2::x($re, $v, $options); }
function xWS($v) { if ($r = ARC2::x('(\\s+)', $v)) { return array($r[1], $r[2]); } return array(0, $v); }
function x($re, $v, $options = 'si') { return ARC2::x($re, $v, $options); }
public function testX() { $actual = ARC2::x('foo', ' foobar'); $this->assertEquals('bar', $actual[1]); }