SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help with regexp

    Code:
    <td class="lName" colspan=2 width="100%">
    										
    										DESERT FOOTHILLS MECHANICAL
    									</td>


    The reg exp I am using is not working....I think it's because there is so much white space?

    Code:
    <td class=\"lName\" colspan=2 width=\"100%\">(.*)<\/td>

  2. #2
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Code:
    #<td class=\"lName\" colspan=2 width=\"100&#37;\">(.+?)<\/td>#s
    Saul

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by php_daemon View Post
    Code:
    #<td class=\"lName\" colspan=2 width=\"100&#37;\">(.+?)<\/td>#s
    what about


    Code:
    <td colspan=2>
    
    	
    
    		10040 N 37th Ave<br>
    											
    										
    										
    								
    	Phoenix, AZ 85051
    											
    										
    										</td>
    									</tr>
    If I want to use regexp to grab Phoenix, AZ 85051

    this is not working
    Code:
    preg_match_all('/<td colspan=2><br>(.*)<\/td>/isU', $data, $match);

  4. #4
    ✯✯✯ silver trophybronze trophy php_daemon's Avatar
    Join Date
    Mar 2006
    Posts
    5,284
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    preg_match_all('/<td colspan=2>.+?<br>(.*)<\/td>/isU'$data$match); 
    Saul

  5. #5
    SitePoint Enthusiast
    Join Date
    Jun 2006
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by php_daemon View Post
    PHP Code:
    preg_match_all('/<td colspan=2>.+?<br>(.*)<\/td>/isU'$data$match); 
    hmm that's not working, its grabbing some other line, anything else I can try?


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
  •