Skip to content

Commit

Permalink
Update nokogiri.php
Browse files Browse the repository at this point in the history
  • Loading branch information
olamedia committed Feb 15, 2012
1 parent d965068 commit b99bf7f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nokogiri.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class nokogiri implements IteratorAggregate{
const
regexp =
"/(?P<tag>[a-z0-9]+)?(\[(?P<attr>\S+)=(?P<value>[^\]]+)\])?(#(?P<id>[^\s:>#\.]+))?(\.(?P<class>[^\s:>#\.]+))?(:(?P<pseudo>(first|last|nth)-child)(\((?P<expr>[^\)]+)\)))?\s*(?P<rel>>)?/isS"
"/(?P<tag>[a-z0-9]+)?(\[(?P<attr>\S+)=(?P<value>[^\]]+)\])?(#(?P<id>[^\s:>#\.]+))?(\.(?P<class>[^\s:>#\.]+))?(:(?P<pseudo>(first|last|nth)-child)(\((?P<expr>[^\)]+)\))?)?\s*(?P<rel>>)?/isS"
;
protected $_source = '';
/**
Expand All @@ -34,7 +34,7 @@ public function getRegexp(){
$class = "(\.(?P<class>[^\s:>#\.]+))?";
$child = "(first|last|nth)-child";
$expr = "(\((?P<expr>[^\)]+)\))";
$pseudo = "(:(?P<pseudo>".$child.")".$expr.")?";
$pseudo = "(:(?P<pseudo>".$child.")".$expr."?)?";
$rel = "\s*(?P<rel>>)?";
$regexp = "/".$tag.$attr.$id.$class.$pseudo.$rel."/isS";
return $regexp;
Expand Down

0 comments on commit b99bf7f

Please sign in to comment.