On Wed, 2010-05-12 at 18:23 +0200, Spud. Ivan. wrote: > > > > > Subject: RE: regexp questions > From: ash@xxxxxxxxxxxxxxxxxxxx > To: spudmixe@xxxxxxxxxxx > CC: php-general@xxxxxxxxxxxxx > Date: Wed, 12 May 2010 17:11:11 +0100 > > On Wed, 2010-05-12 at 18:13 +0200, Spud. Ivan. wrote: > > > > > Date: Tue, 11 May 2010 15:38:41 -0700 > > From: lists@xxxxxxxxx > > To: spudmixe@xxxxxxxxxxx > > CC: php-general@xxxxxxxxxxxxx > > Subject: Re: regexp questions > > > > Spud. Ivan. wrote: > > > > > > I think we've not so much only with the regex, but maybe you can tell me somethin helpful ;) > > > > > > /Word1:<\/a><\/h4>\(<a href=\"http:\/\/www.thiswebsite.com\/some-script.php\">fir.*?st word.*?(.*)Word2:<\/a><\/h4><ul>(.*)Second word:<\/a><\/h4><ul>(.*)Word3:<\/a><\/h4><ul>(.*)rd word/is > > > > > > Thanks. > > > I.Lopez. > > > > > > On 05/11/2010 09:56 AM, Spud. Ivan. wrote: > > >> But it doesn't explain why my regexps work fine within php 5.1 but 5.3 > > >> > > >> Ivan. > > >> > > > > > > Post a regex and what you think it should match but doesn't. > > > > > > > > > > Again... > > > > Why don't you show us an example of what it is you are trying to match this > > against. Then, after that example, show us what you would like to see as the > > output. > > > > Then, send us a copy of the code you are trying to use to make it all happen. > > > > -- > > Jim Lucas > > > > "Some men are born to greatness, some achieve greatness, > > and some have greatness thrust upon them." > > > > Twelfth Night, Act II, Scene V > > by William Shakespeare > > > > > I'm sorry Jim, but as majority of regexp, I can't explain you what I want with words... > > I simply want to pick specific text at very specific places inside the html. > > > > I'm sending you to your email the html and regex so you can test it if you want :) > > > > Thanks. > > I. Lopez. > > > > _________________________________________________________________ > Consejos para seducir ¿Puedes conocer gente nueva a través de Internet? ¡Regístrate ya! > http://contactos.es.msn.com/?mtcmk=015352 > > It might be better to use some of the DOM functions for something like this. You can pull out specific tags and tag content as you need. It's better to rely on DOM functions for these sorts of things than using regular expressions. > > > > > > > Thanks, > Ash > http://www.ashleysheridan.co.uk > > > > > > > > > > > But If I remove tags, I can't match this specific place, because are just these tags who distinct the place where to match. > > > > I.Lopez. > > > > > _________________________________________________________________ > Consejos para seducir ¿Puedes conocer gente nueva a través de Internet? ¡Regístrate ya! > http://contactos.es.msn.com/?mtcmk=015352 It depends what you need to do. If you want to match specific tags, then something like getElementsByTagName() (I believe this function exists in the set of DOM functions) would very easily grab all those tags so you can work on them. I don't see much that a regex could do here that the DOM can't handle. Thanks, Ash http://www.ashleysheridan.co.uk