Good day, There's a link on PHP's site to http://www.phpbuilder.com/columns/dario19990616.php3 . It looks pretty good.
There are many other sites on the 'Net with regular expression references/tutorials. You can probably find some more with just a search engine. ============================ Darren Gamble Planner, Regional Services Shaw Cablesystems GP 630 - 3rd Avenue SW Calgary, Alberta, Canada T2P 4L4 (403) 781-4948 -----Original Message----- From: Wakan [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 19, 2001 10:21 AM To: Darren Gamble Subject: RE: [PHP] regular expression: THANK YOU!!!!!! If fact: that's the solution! It works. I don't know how to thank you. As have you surely notice, I'd need a good regexp (POSIX) manual. have you some good links?? Thanks very much again, Carlo (excuse my English too) At 09.10 19/12/2001 -0700, you wrote: >Good day, > >The problem here is with the .* expression, which matches any character, >including > . The regex is "greedy" and will try and match as much as it >possibly can. > >What you could do is change it so that it doesn't match > . Then, the > >will be matched later in the expression,, as you want. > >So, [^>]* instead of .* should do it, I believe. > >============================ >Darren Gamble >Planner, Regional Services >Shaw Cablesystems GP >630 - 3rd Avenue SW >Calgary, Alberta, Canada >T2P 4L4 >(403) 781-4948 > > >-----Original Message----- >From: Wakan [mailto:[EMAIL PROTECTED]] >Sent: Wednesday, December 19, 2001 9:08 AM >To: [EMAIL PROTECTED] >Subject: [PHP] regular expression > > >Hi, >Can you help me on this simple regexp? >I've this string: >$testata = "<tr bgcolor=\"#FF9900\" valign=\"middle\"><td colspan=\"2\" >align=\"center\" height=\"11\"><div align=\"left\" class=\"titoliblu\">NEWS >A ROTAZIONE</div></td><td class=\"titolipiccolibianchi\" align=\"center\" >height=\"11\" width=\"10%\">cancella</td></tr>"; > >and this eregi: >eregi("^<tr(.*)>(.*)</tr>$",$header,$regs); > >In this way I'd like to obtain the properties of the row >(ie: bgcolor=\"#FF9900\" valign=\"middle\") >and all the columns in the row (the content of each pair <td>...</td>). > >I'm expecting to have this: >in $reg[1]: bgcolor=\"#FF9900\" valign=\"middle\" >in $reg[2]: <td colspan=\"2\" align=\"center\" height=\"11\"><div >align=\"left\" class=\"titoliblu\">NEWS A ROTAZIONE</div></td><td >class=\"titolipiccolibianchi\" align=\"center\" height=\"11\" >width=\"10%\">cancella</td> > >Instead I''ve this: >$reg[1]: bgcolor=\"#FF9900\" valign=\"middle\"><td colspan=\"2\" >align=\"center\" height=\"11\"><div align=\"left\" class=\"titoliblu\">NEWS >A ROTAZIONE</div></td><td class=\"titolipiccolibianchi\" align=\"center\" >height=\"11\" width=\"10%\">cancella</td > >ie the last ">" was found, but I'd like the FIRST one!! > >Can someone give me a solution? >Thanks, Carlo > > >-- >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] -- 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]