String Help
| From: | Herhuth, Ron | Date: | Thu, 06 Nov 2003 13:54:54 +0000 |
| Subject: | String Help | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-22015@lists.php.net to get a copy of this message | ||
I have an instance where I am trying to remove a couple different string
scenerios from a variable. I have spent some time with regEx but I'm not
getting anywhere. I'm hoping someone could help me out here.
Basically I have names that MAY contain middle initials which I need to
remove:
John D. Smith
I need to strip the "D." so that I have only John Smith
In addition I have a few instances where the name contains a secondary
last name in parentheses that I need to remove:
Joanne (Taylor) Smith
I need to strip the Taylor so that I am left with Joanne Smith.
If anybody could help me with this I would be very appreciative.
Ron