Regular Exception - problem with preg match



Hello Everybody !

I need to parse a website, but I have a problem with preg_match
function ,

for example, i have a string ...

$string = ' junk<table><b>BINGO</b></table>
junk<table><b>bingo2</b></table>
junk2<table><b>bingo3</b></table>';

preg_match('|<table+*(.*)</table>+|sim', $string $r);
echo $r[0];
echo $r[1];

is not working

How to catch only bingo's ?
I need only content of table tags as each element of array.

I hope You understand my problem , sorry for my english.

if you have any ideas please share with me on group or private

mail l.frackowiak@xxxxxxxxxxxxxxxxxxxxxxxxxxx

.



Relevant Pages

  • Re: Dynamic webpage update?
    ... Than you'll need to parse this string to find ... > where those lotto numbers are. ... > website and show it on your website. ...
    (alt.php)
  • Re: parsing string
    ... What is a good way to parse a string like ... echo 'abc31/244/34.567' |\ ... awk -F. ...
    (comp.unix.shell)
  • Retrieving and Parsing Particular Data From a Website
    ... I'm trying to get particular data from a website. ... Parse the source code and locate the string indicating that the ...
    (perl.beginners)
  • Re: set user=%username%
    ... Your most recent feedback confirms that Windows is ... Type this: echo %MyName% ... > usertest=This is a long string. ...
    (microsoft.public.windows.server.general)
  • Re: its not the school home work
    ... I've learned a bit about strong quotes and think I realized when to ... the shell (such as in the $var, but also for the spaces (that ... echo "foo bar" ... you may say that $string does not appear in /list/ context so ...
    (comp.unix.shell)