SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: Regex

  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2008
    Posts
    41
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Regex

    Hi there

    I use this regex:

    PHP Code:
    if (preg_match_all('|\<div class=\"SF-Clear\"\>([\w\W]*?)\<div class=\"footContainer\"\>|',$str,$match)) {
        
    print_r($match);
        } 
    It does runs perfect on my real site but when I run it on my localhost using Wamp the match is not recognized and, of course, script does aborts.
    I tried to find differences between my server config and my localhost but I don't find significant difference.
    Somebody can help me ?
    Why that regex does fails on my localhost ?
    Thanks in advance

  2. #2
    Twitter: @AnthonySterling silver trophy AnthonySterling's Avatar
    Join Date
    Apr 2008
    Location
    North-East, UK.
    Posts
    6,111
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Compare magic quotes on both systems, you should find your answer.

    http://uk.php.net/manual/en/security....disabling.php
    @AnthonySterling: I'm a PHP developer, a consultant for oopnorth.com and the organiser of @phpne, a PHP User Group covering the North-East of England.


Bookmarks

Posting Permissions

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