If you have a problem with the length of the string, you're going to have to
loop across it, as there's not way I know of to limit the length of the
output without limiting the length of the input.
-- Ben Doom
Programmer & General Lackey
Moonbow Software, Inc
: -----Original Message-----
: From: Ewok [mailto:[EMAIL PROTECTED]
: Sent: Thursday, May 29, 2003 8:52 PM
: To: CF-Talk
: Subject: Re: Regex?
:
:
: hello? no ideas?
:
: ----- Original Message -----
: From: "Ewok" <[EMAIL PROTECTED]>
: To: "CF-Talk" <[EMAIL PROTECTED]>
: Sent: Thursday, May 29, 2003 1:30 AM
: Subject: Regex?
:
:
: > Hi,
: >
: >
: > I've written a message board in CF.... The user's can add links to their
: > posts and make them hot by surrounding the url in brackets
: > [http://houseoffusion.com]
: > in the output code i search their post and replace this with the
: appropriate
: > html using the regex below...
: >
: > <cfset post = rereplace(post, '\[([^]]+)\]', '<a href="\1">\1</a>',
: 'all')>
: >
: > recently someone broke the table structure with the longest
: link known to
: > man... (seriously)
: >
: > so I've been pounding my head against the screen trying to come
: up with a
: > regex to allow link text or to use a set number of characters from the
: link
: > AS the link text....
: >
: > with link text.. maybe turn something like
: > [House of Fusion|http://houseoffusion.com]
: > into
: > <a href="http://houseoffusion.com">House of Fusion</a>
: >
: > or maybe
: > [http://houseoffusion.com]
: > into
: > <a href="http://houseoffusion.com">http://houseoffus...</a>
: >
: > my heads getting a bruise and my screen is about to crack... help!
: >
: > (~) o
: > _\
: > ~ /
: >
: >
: >
:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at
http://www.coolfusion.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4