Something like this perhaps?
<cfset bigChunkOText =
left(ListSetAt(bigChunkOText,26,"[[ALANKHOLDEN_SUPERGENIUS]]","
"),find("[[ALANKHOLDEN_SUPERGENIUS]]",bigChunkOText)) />
Treat the space as a delimiter, and you're working with a big list.
Replace list element 26 with a foo string.
Now treat your big list like a string again, and chop it off at - and
after - your newly inserted foo string.
I suppose I shoulda tested it...
Alan K. Holden,
Hugo Ahlenius wrote:
> Bonus points if anyone can come up with some alternative way to cut off a
> big chunk of text at 25 words without using a loop (regexp, anyone?)
--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
http://groups.google.com/group/openbd?hl=en
official site @ http://www.openbluedragon.org/
!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---