Regex question - Grabbed what I want but need usable format
Posted: Fri Oct 02, 2009 10:39 pm
Greetings:
I have a Regex going out to my local real estate MLS and grabbing this bit of their site to add my listings to my own website automatically. I'm about to get the following into a variable called $property_photos:
\'/pphotos/54/209028054.101.jpg?id=418545,/pphotos/54/209028054.102.jpg?id=418545,/pphotos/54/209028054.103.jpg?id=418545,/pphotos/54/209028054.104.jpg?id=418545,/pphotos/54/209028054.105.jpg?id=418545,/pphotos/54/209028054.106.jpg?id=418545,/pphotos/54/209028054.107.jpg?id=418545,/pphotos/54/209028054.108.jpg?id=418545,\',\'www.sunshinemls.com\',\'8081\'
The URL's of the photos all have the same domain name so how can I get just them, without the id=418545? The other challenging part is that for each home, that ?id= part will have a different number so I can't just do a regex pointing to that.
I'm stumped on this one and would appreciate any help you could provide. Thanks for looking.
I have a Regex going out to my local real estate MLS and grabbing this bit of their site to add my listings to my own website automatically. I'm about to get the following into a variable called $property_photos:
\'/pphotos/54/209028054.101.jpg?id=418545,/pphotos/54/209028054.102.jpg?id=418545,/pphotos/54/209028054.103.jpg?id=418545,/pphotos/54/209028054.104.jpg?id=418545,/pphotos/54/209028054.105.jpg?id=418545,/pphotos/54/209028054.106.jpg?id=418545,/pphotos/54/209028054.107.jpg?id=418545,/pphotos/54/209028054.108.jpg?id=418545,\',\'www.sunshinemls.com\',\'8081\'
The URL's of the photos all have the same domain name so how can I get just them, without the id=418545? The other challenging part is that for each home, that ?id= part will have a different number so I can't just do a regex pointing to that.
I'm stumped on this one and would appreciate any help you could provide. Thanks for looking.