Howdy All:
I am trying to write a regular expression to basically process dvd titles. For example if I have
The Great Mouse Detectives I would like to display Great Mouse Detectives, The
I have a function that does almost what I need but when there is a special character i.e( .,!@#$%...) it breaks.
A.I. Artificial Intelligence => .I. Artificial Intelligence, A
Is there a way that I can get preg_match to exclude a set of characters after it matches the ‘A’?
preg_match("/\b$needle\b/i", strtolower($haystack))
$needle is ‘a’ or ‘an’ or ‘the’ and $haystack is the original title.
Any help would be awesome!!!
exclude special characters???
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
You might want to stay away from double-posting your questions. That is frowned upon around here. Someone will eventually get to your post. Be patient, there are a lot of people that could possible help you.
By the way, have you taken the forum tour yet?
By the way, have you taken the forum tour yet?