Re: ereg / regexp fun

From: Date: Wed, 16 Aug 2000 16:28:32 +0000
Subject: Re: ereg / regexp fun
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-12050@lists.php.net to get a copy of this message
Steven Werby <steven-lists@befriend.com> wrote: > Steven Werby wrote: > > > ereg(" :([a-z] {1}) ", $msg, $item) > > Well, almost. > But this means, there has to be a blank at both ends. So something > like $msg = ":a"; still doesn't work Correct. But your example was: $msg = 'see :a for info'. If your real data is going to look different from your example you'll need to modify to suit your needs. And Hans is correct that the {1} is not necessary in my solution. I realized that after I sent it. Anyway, there are many ways to do what you need. I skimmed the other posters' solutions and they look like they'll work too - atl east for the example you gave. -- Steven Werby {steven-lists@befriend.com} President, Befriend Internet Services LLC http://www.befriend.com/ 804-355-WEBS

« previous php.general (#12050) next »