Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    May 2006
    Posts
    107
    Thanks
    1
    Thanked 0 Times in 0 Posts

    preg_match_all error

    PHP Code:
            $title ':(.*)./msU';
            
    preg_match_all($title$value$matche); 
    this gives me:
    Warning: preg_match_all() [function.preg-match-all]: No ending delimiter ':' found in C:\wamp\www\zzz\test.php on line 34
    :


    My Input:
    Code:
    <li><a name="ChenFL02" href="../../indices/a-tree/c/Chen:Ping.html">Ping Chen</a>, <a href="../../indices/a-tree/f/Fu:Zhaohui.html">Zhaohui Fu</a>, <a href="../../indices/a-tree/l/Lim:Andrew.html">Andrew Lim</a>:
    The Yard Allocation Problem.
    3-8 <font size="-3"><a href="http://dblp.uni-trier.de/rec/bibtex/conf/aaai/ChenFL02">BibTeX</a></font>

  • #2
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    $title isn't a valid regular expression, you need 'delimiters' at the start and end. is the 'msU' bit meant to be regexp-options? if so you want to use '#:(.*)#msU'
    My thoughts on some things: http://codemeetsmusic.com
    And my scrapbook of cool things: http://gjones.tumblr.com


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •