--- James Keeline <[EMAIL PROTECTED]> wrote:
>> making it so that if someone searches for a part number 'cp7940'
>> they'll get matching results that include dashes, such as
>> 'cp-7940'.
>
> elegant would be to use PHP to insert a % sign at the transition
> between the letters and numbers. Consider this sample table:
>
> In PHP:
> $out = preg_replace('/([a-zA-Z]+)-?([0-9]+)/', '\\1%\\2', $in);
Yup, elegant and with a minimum of code. That's what I'm looking for.
As I stated to Pete a few minutes ago, the code is already so b0rked
from having several different programmers tinker with it (and none of
them all that hot--myself included) that if I can do this with as
little modification as possible, I'll be really happy. This looks to be
the solution I need.
Thanks, James.
-Bob
__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/