Ian,

On 12/1/2003 at 13:02, you wrote:

IS> Anybody know a trick (regex or otherwise) to find the position of
IS> the last white space character before an arbitrary limit?

IS> In the following example, I want the position of the last white
IS> space before the 25th character.

IS> "The quick brown fox jumped over a lazy dog."

IS> So I would want the position of the white space after 'fox', which
IS> is the 20th character.  This is the last white space before the
IS> 25th character with is the 'e' in 'jumped'.  Allowing me to break
IS> the string into:

IS> "The quick brown fox "    <!-- note: trailing white space is
IS> included. --> "jumped over a lazy dog."

Not the homemade solution you're looking for, but MX6.1's wrap()
function supposedly does 'smart' wrapping automatically:

http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/funca119.htm

~ Ubqtous ~
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to