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 6 of 6
  1. #1
    Regular Coder
    Join Date
    Oct 2005
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts

    easy regular expression help plz

    Code:
    <tr colData0='[5thP]CPL.Hitman.5' colData1='1162585564' colData2='-4' colData3='offline' >
    			<td class="m_est_clan_member_name_col">
    				<a href="/profile/rjpaul1989">[5thP]CPL.Hitman.5</a>
    			</td>
    
    			
    			<td class="m_est_clan_member_join_col">
    				Nov 3, 2006
    			</td>
    			
    			<td class="m_est_clan_member_rank_col">
    				Member 4
    			</td>
    			
    			<td class="m_est_clan_member_status_col">
    				offline
    			</td>
    		</tr>
    
    	
    
    		<tr colData0='[5thP]SSG.NeZoRiL.5' colData1='1162575984' colData2='-3' colData3='offline' >
    			<td class="m_est_clan_member_name_col">
    				<a href="/profile/nezoril">[5thP]SSG.NeZoRiL.5</a>
    			</td>
    			
    			<td class="m_est_clan_member_join_col">
    				Nov 3, 2006
    			</td>
    			
    			<td class="m_est_clan_member_rank_col">
    				Member 3
    			</td>
    
    			
    			<td class="m_est_clan_member_status_col">
    				offline
    			</td>
    		</tr>

    hi, from the above code i would like to extract the blue and green parts, so that i can compile a list of users and there status.

    plz can somebody help.

  • #2
    Regular Coder
    Join Date
    May 2005
    Posts
    563
    Thanks
    0
    Thanked 3 Times in 3 Posts
    It would be easier to get it from the coldata0='[5thP]CPL.Hitman.5'.

    I can do it without regular expressions, but obviously they would be faster. Let me know if you want it done another way.
    Last edited by SeeIT Solutions; 11-16-2006 at 12:00 PM.

  • #3
    Regular Coder
    Join Date
    Oct 2005
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the fastest way is best

  • #4
    Regular Coder
    Join Date
    May 2005
    Posts
    563
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Sorry, can't help u then

  • #5
    Regular Coder
    Join Date
    Oct 2005
    Posts
    127
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i didnt notice the 'coldata0=' parts, so after u posted i managed to get it working using them. So, you were a big help actually, ty.

    Code:
    $log = file_get_contents('http://www.xfire.com/clans/5thplatoon/');
    	preg_match_all('/(colData0=\')(.+?)(\' colData1=)/', $log, $matches);
    	preg_match_all('/(colData3=\')(.+?)(\' >)/', $log, $matches2);

  • #6
    Regular Coder
    Join Date
    May 2005
    Posts
    563
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Ha, np then


  •  

    Posting Permissions

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