Whoops, sorry post aborted prematurely. What I was going say say was that:
test, something <OPTION VALUE="test">test</OPTION> test! should become: anotherword, something <OPTION VALUE="test">test</OPTION> anotherword! Thanks again for helping! ----- Original Message ----- From: "Jim" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 1:24 PM Subject: Re: [PHP] Regex Help > Thanks for helping. Unfortunately, that doesn't quite accomplish the task > either. The other example for my first post would be mangled with that. > > ----- Original Message ----- > From: "Rick Emery" <[EMAIL PROTECTED]> > To: "Jim" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Thursday, December 19, 2002 1:09 PM > Subject: Re: [PHP] Regex Help > > > > <?php > > $q = "test <OPTION VALUE=\"test\">test</OPTION> test"; > > ereg("(.*)(<OPTION.*OPTION>)(.*)",$q,$ar); > > $t = "anotherword".$ar[2]."anotherword"; > > print $t; > > ?> > > > > outputs: > > anotherword<OPTION VALUE="test">test</OPTION>anotherword > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php