SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jan 2005
    Location
    trenton
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    regular expression

    i cant work..

    $test4
    . . . . |
    . . . . v
    HTML Code:
    ............
    <TD WIDTH="15%">Today<BR> Jan 07</TD>
    <TD WIDTH="10%"><IMG SRC="http://image.weather.com/web/common/wxicons/31/14.gif" WIDTH=31 HEIGHT=31 BORDER=0></TD>
    <TD WIDTH="35%">AM Snow Showers</TD>
    <TD WIDTH="25%" ALIGN="CENTER"><B>12&deg;/-1&deg;</B></TD>
    <TD WIDTH="15%" ALIGN="CENTER">30 %</TD>...........
    i try "AM Snow Showers" regular expression..

    PHP Code:
    preg_match_all  ("/^<TD WIDTH=\"35%\">[a-zA-Z\s\/]+?<\/TD>$/",$test4,$test4); 
    can't working..

    Help!
    -brownguy02

  2. #2
    Umm. PHP Guru....Naaaah jaswinder_rana's Avatar
    Join Date
    Jul 2004
    Location
    canada
    Posts
    3,193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    only tak e^ and $ out of your expression and then try again like this
    PHP Code:
     preg_match_all  ("/<TD WIDTH=\"35%\">[a-zA-Z\s\/]+?<\/TD>/",$test4,$test4); 

  3. #3
    SitePoint Member
    Join Date
    Jan 2005
    Location
    trenton
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank You


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
  •