As a side note, I've never seen a single wrap() function work 100% correctly.
Not the one built into CF, not any of the UDFs. All of them break on something.
Even the one I use on the HoF reply page is not 100% as it will break a long url
into pieces to make it fit properly.

> Anybody know a trick (regex or otherwise) to find the position of the last
> white space character before an arbitrary limit?
>
> In the following example, I want the position of the last white space before
> the 25th character.
>
> "The quick brown fox jumped over a lazy dog."
>
> So I would want the position of the white space after 'fox', which is the
> 20th character.  This is the last white space before the 25th character with
> is the 'e' in 'jumped'.  Allowing me to break the string into:
>
> "The quick brown fox "    <!-- note: trailing white space is included. -->
> "jumped over a lazy dog."
>
> I don't think this should be that hard, but for some reason, it has given me
> lots of trouble.
>
> Thanks
>
> --------------
> Ian Skinner
> Web Programmer
> BloodSource
> www.BloodSource.org
> Sacramento, CA
>
>
>
> Confidentiality Notice:  This message including any
> attachments is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the
> intended recipient, please contact the sender and
> delete any copies of this message.
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to