Worked like a charm, and did no harm!
Can't ask for more than that. Thanks John!
Reini, Steve, Jeff, et. al: any idea whether this patch is
appropriate to commit to the code base? Any disadvantages to this mod
from others?
Micki
>Message: 3
>Date: Wed, 3 Mar 2004 22:44:26 +0000
>To: php...@li...
>From: John Kershaw <li...@ke...>
>Subject: Re: [Phpwiki-talk] regex modification
>
>At 3:17 pm -0500 3/3/04, Micki Kaufman wrote:
> >We need a run of capital letters to be treated as a word, EXCEPT the
> >last of the capital letters... like this:
> >
> >ABCProductInfo should become ABC Product Info
> >
> >right now, it becomes ABCProduct Info
>
>Caveat: I'm still using 1.3.2. Your mileage may vary.
>
>I wanted the same thing for pages like this:
>http://www.through-the-maze.org.uk/pages/BTCVConservationVolunteers
>
>and made the following changes to my lib/stdlib.php file:
>
>/*
> // This splits the single-letter words 'I' and 'A' from any
>following capitalized words.
> $RE[] = '/(?: |^)([AI])([[:upper:]])/';
>*/
> // Space before last capital in a run of caps: PCCMeeting ->
>PCC Meeting
> $RE[] = '/([[:upper:]]+)([[:upper:]][[:lower:]])/';
>
>ie I commented out the first one and added in the second one.
>
>John.
--
Micki
mailto:mic...@co...
|