php-windows | 2001051
Date: 05/15/01
- Next message: Darren: "[PHP-WIN] Custom Dll's for php"
- Previous message: Michael Kelley: "[PHP-WIN] Help with Preg match all (newbie)"
- In reply to: Michael Kelley: "[PHP-WIN] Help with Preg match all (newbie)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Okay a little known fact that I left out ... each of the names has a \n
attached to it after the first name. after reading more I found out
about the m pattern modifier.
my pcre now looks like
preg_match_all( "/^$searchstr.*/im", $text, $array)
This seems to have gotten it.
Thanks anyway
Michael Kelley wrote:
> Hello all,
> I'm trying to do a name search from a string containing full names.
> the format of the names is "Lastname, FirstName"
> the preg expression I'm using is
>
> preg_match_all( "/\b$searchstr.*.,.*/i", $text, $array)
>
> This works great if you don't type in the full last name
> i.e. kelle
> will return my entry but kelley returns nothing.
> Anyone out there that can help? I'd greatly appreciate it. Well I'm off
> to read more documentation and see if I can dig it out.
--Michael Kelley mkelley <email protected> Programmer/Systems Analyst I New Mexico State University Information and Communication Technologies Work # (505)-646-1374 P.O. Box 30001 MSC: 3AT Las Cruces, NM 88003
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-windows-unsubscribe <email protected> For additional commands, e-mail: php-windows-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Darren: "[PHP-WIN] Custom Dll's for php"
- Previous message: Michael Kelley: "[PHP-WIN] Help with Preg match all (newbie)"
- In reply to: Michael Kelley: "[PHP-WIN] Help with Preg match all (newbie)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

