Heya Palyne!  Interesting name!  =-)

The first one (a) is pretty easy.  Check out the Chr()
and Replace() functions.  The substring to be replaced
will be Chr(13)&Chr(10) (I think... you'll probably
have to experiment some), and the substring to replace
with is "<br>", assuming you want to convert the text
to html...

The second one (b) is a little harder, but not too
imposing.  You *can* use the Find() function to
identify "http://..." or "www.x.x" or "[EMAIL PROTECTED]" strings,
grab the beginning and ending position of the
substring in question, and then use the Mid() function
to wrap the href or mailto around the substring. 
There may be other ways to accomplish this (through
custom tags or otherwise), but if you want to stick to
ColdFusion string functions, the above should work for
you...  Just check out the String functions in CF
Studio Help...


--- Palyne Gaenir <[EMAIL PROTECTED]> wrote:
> Dear list,
> 
> I know this topic has been covered.  I searched
> through a few 
> thousand messages before giving up...  I would like
> to find this 
> answer prior to the next century... Does anyone have
> a quick 
> reference to how to do perl-like string formatting,
> such as take 
> entries put into a textarea form field and make it
> so that 
> 
> (a) if a hard return was entered, it puts in a line
> break;
> (b) if an email or www address was entered, it makes
> it a link?
> 
> Many thanks, and so sorry because I'm sure this has
> already been said 
> at some point I just can't seem to find it.
> 
> Regards,
> Palyne
> 
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to