NUGROHO NOTO wrote:
> I am looking for those script which can strip the HTML part.. but still can 
> retain the carriage return (otherwise my text will just continue without 
> break)
> anybody knows where we can get / buy this custom tags ? 
>
>   
Sounds like a three-step thing to me.

First, find all occurances of break tags (searching for "<br" to catch 
both old style "<br>" and newer xhtml-y "<br />") and insert a single 
carriage return character before said tags.

Next, find all paragraph tags (searching for "<p" because some tags may 
be like "<p style='styleName'>") and insert TWO carriage return 
characters before them (to properly visually separate one paragraph from 
another).

Then, use a regex to strip out all HTML tags. Since you'll already have 
inserted carriage returns to replace the <br> and <p> tags, they can be 
stripped along with everything else and the remaining text should retain 
the format you're after.

Regex to use:  ReReplaceNoCase(yourVar, "<(.|\n)+?>", "", "ALL") should 
strip out all content that starts with a < to the next occuring >.

Give that a try.

--Scott

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288355
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to