this should work, if (preg_match_all('/<a .+?href=([\'"])(.+?)\1/is', $mem, $result)) { $linksarray = $result[2]; }
"Julio Nobrega Trabalhando" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi all, > > I was sure I saw something like this on this list one month ago. But I > search for like dozens of word combination to find this post (or anything > related to), and was unsuccesful. > > Anyone has a quick snippet that will scan a bunch of text characters and > return the links as an array element? > > Something like: > > text to search: > <a > href="http://www.stj.gov.br/stj/noticias/detalhes_noticias.asp?seq_noticia=4 > 776">Proprietário que retoma imóvel negociado responde pelas despesas > condominiais atrasadas</a> <a > href="http://www.stj.gov.br/stj/noticias/detalhes_noticias.asp?seq_noticia=4 > 775">Ouro Preto garante no STJ o recebimento de parcela de ICMS da Vale do > Rio Doce</a> > > > And it could return: > $array = Array(); > $array[] = > 'http://http://www.stj.gov.br/stj/noticias/detalhes_noticias.asp?seq_noticia > =4776'; > $array[] = > 'http://www.stj.gov.br/stj/noticias/detalhes_noticias.asp?seq_noticia=4775'; > > Thanks a lot, and again sorry if this is a duplicated question, but I > really did not find. > > -- > > Julio Nobrega > > Don't eat the yellow snow. > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]