Show
Ignore:
Timestamp:
10/05/08 06:21:43 (3 months ago)
Author:
drry
Message:
  • fixed regexes.
  • et cetera.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/php/HTML_CSS_Mobile/trunk/HTML/CSS/lib/selectorToXPath.php

    r17637 r20748  
    2626 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
    2727 * THE SOFTWARE. 
    28  */  
     28 */ 
    2929 
    3030/** 
     
    3434 * のPHP移殖版 
    3535 *   理解のいたる範囲で移植したので劣化コピーかもしれない。 
    36  */  
     36 */ 
    3737class selectorToXPath 
    3838{ 
     
    4343      'element'    => '/^(\*|[a-z_][a-z0-9_-]*)/i', 
    4444      'id_class'   => '/^([#.])([a-z0-9*_-]*)/i', 
    45       'attribute'  => '/^\[\s*([^~\|=\s]+)\s*([~\|]?=)\s*"([^"]+)"\s*\]/i', 
    46       'attr_box'   => '/^\[([^\]]*)\]/i', 
    47       'attr_not'   => '/^:not\((.*?)\)/i', 
     45      'attribute'  => '/^\[\s*([^~|=\s]+)\s*([~|]?=)\s*"([^"]+)"\s*\]/', 
     46      'attr_box'   => '/^\[([^\]]*)\]/', 
     47      'attr_not'   => '/^:not\(([^)]*)\)/i', 
    4848      'pseudo'     => '/^:([a-z0-9_-]+)(\(([a-z0-9_-]+)\))?/i', 
    4949      'combinator' => '/^(\s*[>+~\s])/i', 
    50       'comma'      => '/^,/i', 
     50      'comma'      => '/^,/', 
    5151    ); 
    5252