RE: [PHP] @#$@# Reg Expressions

From: Date: Tue, 30 Oct 2001 03:09:41 +0000
Subject: RE: [PHP] @#$@# Reg Expressions
Groups: php.general 
Request: Send a blank email to php-general+get-72811@lists.php.net to get a copy of this message
what something like: $the_array=split("<A ([^>]*)</A>", $html,-1); ?? so, everything that's not a ">" -----Original Message----- From: brendan [mailto:brendan.gogarty@utas.edu.au] Sent: Tuesday, October 30, 2001 1:59 PM To: php-general@lists.php.net Subject: [PHP] @#$@# Reg Expressions thanks but it didnt work either .. ;) Matt Friedman wrote: > Try putting a "?" after your quantifier for "non-greedy" matching. > > Something like: $the_array=split("<A (.*?)</A>", $html,-1); > > Matt. > > > > ----- Original Message ----- > From: "brendan" <brendan.gogarty@utas.edu.au> > To: <php-general@lists.php.net> > Sent: Monday, October 29, 2001 7:55 PM > Subject: [PHP] @#$@# Reg Expressions > > > >>love em.. right now I hate em.. >> >>can someone inform me why the below doesnt work? >>it is intended to strip out all the links in a page and return an array >>.. insanity is just starting to set in.. >> >>cheers >> >>$html =GETSITE($url); >>// and put in a new line break behind every anchor tag >>$the_array=spliti("<A (.*)</A>", $html,-1); >>echo $the_array ; >>foreach($the_array AS $k) echo $k."<HR>"; >>} >> >> >>-- >>PHP General Mailing List (http://www.php.net/) >>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net >>For additional commands, e-mail: php-general-help@lists.php.net >>To contact the list administrators, e-mail: php-list-admin@lists.php.net >> >> >> >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#72811) next »