There's a RegEx for every problem (and conversely, a problem with every
Regex :)

<cfscript>
function wordSplit(str, splitAt, splitChar){
        return REReplace(str, "([\S]{#splitAt#,#splitAt#})", "\1#splitChar#",
"All");
}
</cfscript>
<cfoutput>#wordSplit(str, 50, " ")#</cfoutput>

There are probably cases where it wouldn't work though :)

--
 Lindsay Evans.
 Developer,
 Red Square Productions.

 [p] 8596.4000
 [f] 8596.4001
 [w] www.redsquare.com.au

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of John Bishop
Sent: Friday, June 13, 2003 2:44 PM
To: CFAussie Mailing List
Subject: [cfaussie] RE: Insert spaces in long words...?


****************************************************************

This e-mail is subject to the disclaimer contained at the bottom of this
message.

*****************************************************************
:
...yea, that might do it....
;)
Thanks Ben, I'll give this a go :) And yeah, Taco, you're right - if
someone's messing with the system, they deserve to see crappy results.
Problem is, all the other users would see it too...
Cheers guys!
jb :)


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to