From: "Spud. Ivan." on


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.


--
Thanks!
-Shawn
http://www.spidean.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

_________________________________________________________________
Disfruta de Messenger y Hotmail en tu BlackBerry ¡Hazlo ya!
http://serviciosmoviles.es.msn.com/messenger/blackberry.aspx
From: Ashley Sheridan on
On Tue, 2010-05-11 at 22:45 +0200, 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.
>
>
> --
> Thanks!
> -Shawn
> http://www.spidean.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> _________________________________________________________________
> Disfruta de Messenger y Hotmail en tu BlackBerry ¡Hazlo ya!
> http://serviciosmoviles.es.msn.com/messenger/blackberry.aspx


What are you trying to match the regex against?

Also, I've noticed you've used a lot of periods (.) where it looks like
you intended a literal period to be matched. In regular expressions,
periods match any character expect the newline, so "www.thiswebsite.com"
would also match the string "www_thiswebsite_com".


Ps, please try not to top post, as it disrupts the zen flow of the
list! :)

Thanks,
Ash
http://www.ashleysheridan.co.uk


From: "Spud. Ivan." on




> From: ash(a)ashleysheridan.co.uk
> To: spudmixe(a)hotmail.com
> CC: php-general(a)lists.php.net
> Date: Tue, 11 May 2010 21:43:54 +0100
> Subject: RE: [PHP] regexp questions
>
> On Tue, 2010-05-11 at 22:45 +0200, 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.
> >
> >
> > --
> > Thanks!
> > -Shawn
> > http://www.spidean.com
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> > _________________________________________________________________
> > Disfruta de Messenger y Hotmail en tu BlackBerry ¡Hazlo ya!
> > http://serviciosmoviles.es.msn.com/messenger/blackberry.aspx
>
>
> What are you trying to match the regex against?
>
> Also, I've noticed you've used a lot of periods (.) where it looks like
> you intended a literal period to be matched. In regular expressions,
> periods match any character expect the newline, so "www.thiswebsite.com"
> would also match the string "www_thiswebsite_com".
>
>
> Ps, please try not to top post, as it disrupts the zen flow of the
> list! :)
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>




Ok I'm sorry for top posting ;)



Sure, I know that . match any character, but only one and It doesn't matter to me if it's . or _ , it's ok I think.



The problem is that if I test it in a small string, it works, but if I take the 30kb html source, it only works with php versions older than 5.2

So, I think you wan't not to test the regexp within the original file, (or yes? :) )



I.Lopez.



_________________________________________________________________
Diseñar aplicaciones tiene premio. ¡Si eres desarrollador no esperes más!
http://www.imaginemobile.es
From: Ashley Sheridan on
On Tue, 2010-05-11 at 23:48 +0200, Spud. Ivan. wrote:

>
>
>
> > From: ash(a)ashleysheridan.co.uk
> > To: spudmixe(a)hotmail.com
> > CC: php-general(a)lists.php.net
> > Date: Tue, 11 May 2010 21:43:54 +0100
> > Subject: RE: [PHP] regexp questions
> >
> > On Tue, 2010-05-11 at 22:45 +0200, 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.
> > >
> > >
> > > --
> > > Thanks!
> > > -Shawn
> > > http://www.spidean.com
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> > > _________________________________________________________________
> > > Disfruta de Messenger y Hotmail en tu BlackBerry ¡Hazlo ya!
> > > http://serviciosmoviles.es.msn.com/messenger/blackberry.aspx
> >
> >
> > What are you trying to match the regex against?
> >
> > Also, I've noticed you've used a lot of periods (.) where it looks like
> > you intended a literal period to be matched. In regular expressions,
> > periods match any character expect the newline, so "www.thiswebsite.com"
> > would also match the string "www_thiswebsite_com".
> >
> >
> > Ps, please try not to top post, as it disrupts the zen flow of the
> > list! :)
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
>
>
>
>
> Ok I'm sorry for top posting ;)
>
>
>
> Sure, I know that . match any character, but only one and It doesn't matter to me if it's . or _ , it's ok I think.
>
>
>
> The problem is that if I test it in a small string, it works, but if I take the 30kb html source, it only works with php versions older than 5.2
>
> So, I think you wan't not to test the regexp within the original file, (or yes? :) )
>
>
>
> I.Lopez.
>
>
>
> _________________________________________________________________
> Diseñar aplicaciones tiene premio. ¡Si eres desarrollador no esperes más!
> http://www.imaginemobile.es


Is it possible that you're running out of memory for this script?
Increase the memory a script can use in php.ini to see if this helps.

If that doesn't, can you determine the exact maximum filesize you can
process with this regular expression? It could be you've found a bug in
the regex parser perhaps?

Thanks,
Ash
http://www.ashleysheridan.co.uk


From: Jim Lucas on
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