You could use the REPLACE function within a SQL query/command. But I
recommend doing it at the presentation layer like Ray said. More
specifically, I would use the regular expression (RegExp) object in
ASP/VBScript to replace all HTML tags. Here's an example:
Set objRegExp = New RegExp
objRegExp .IgnoreCase = True
objRegExp .Pattern = "<[^<]*>"
objRegExp .Global = True
strTextWithoutTags = objThisRegExp.Replace(strTextWithTags, "")
Set objRegExp = Nothing
Hope that helps.
- Vieth
> -----Original Message-----
> From: Alex [mailto:[EMAIL PROTECTED]
> Sent: Thursday, December 09, 2004 3:25 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [ASP] Replacing text... "<" / ">" becomes "|"
>
>
> I'm happy storing them (in fact, I need the stored) but when
> it comes to summarising the field, and I don't want line
> breaks, italics, bold, urls etc, how do I remove the "<" and
> ">"'s etc?
>
> Many thanks
>
>
> Alex
>
>
>
> NOTE: The information contained in this email is intended for
> the named recipients only, it may be privileged and
> confidential. If you are not the intended recipient, you must
> not copy distribute or take any action in reliance upon it.
> No warranties or assurances are made in relation to the
> safety and content of this email and any attachments. No
> liability is accepted for any consequences arising from it.
>
>
> _____
>
> From: Ray at work [mailto:[EMAIL PROTECTED]
> Sent: 09 December 2004 21:16
> To: [EMAIL PROTECTED]
> Subject: RE: [ASP] Replacing text... "<" / ">" becomes "|"
>
>
> Why is it necessary to replace them? I suggest that you not
> alter the data
> that is inputted. If it needs to be filtered for HTML
> display purposes,
> that's fine, but you should do that filtering at the
> presentation level.
> That is, let the data being stored be the real data and then
> worry about the
> < and > characters when they're a problem.
>
> Ray at work
>
> > -----Original Message-----
> > From: Alex [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, December 09, 2004 4:01 PM
>
> >
> > If you have a database record:
> >
> > text = "la la la la la <br><br> le le le le le <br><br> lo lo
> > lo lo lo"
> >
> > and it is necessary to remove the "<" and ">"'s, how would
> > you go about
> > doing that?
> >
> > Possibly replacing "<" and ">" with "|"...
>
>
>
>
> --------------------------------------------------------------
> -------
> Home : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
> Post : [EMAIL PROTECTED]
> Subscribe : [EMAIL PROTECTED]
> Unsubscribe: [EMAIL PROTECTED]
> ---------------------------------------------------------------------
>
>
>
> Yahoo! Groups Sponsor
>
> ADVERTISEMENT
>
> <http://us.ard.yahoo.com/SIG=129oea0b9/M=297844.5692940.675020
> 0.3356155/D=gr
> oups/S=1705115381:HM/EXP=1102713372/A=2196681/R=0/SIG=10v7of2a
> m/*http://www.
> target.com/careers> click here
>
> <http://us.adserver.yahoo.com/l?M=297844.5692940.6750200.33561
> 55/D=groups/S=
> :HM/A=2196681/rand=806827551>
>
> _____
>
> Yahoo! Groups Links
>
>
> * To visit your group on the web, go to:
> http://groups.yahoo.com/group/active-server-pages/
>
>
> * To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]
> t=Unsubscribe>
>
>
>
> * Your use of Yahoo! Groups is subject to the Yahoo!
> Terms of Service
> <http://docs.yahoo.com/info/terms/> .
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------ Yahoo! Groups Sponsor
> --------------------~-->
> $4.98 domain names from Yahoo!. Register anything.
> http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/17folB/TM
> --------------------------------------------------------------
> ------~->
>
> --------------------------------------------------------------
> -------
> Home : http://groups.yahoo.com/group/active-server-pages
> ---------------------------------------------------------------------
> Post : [EMAIL PROTECTED]
> Subscribe : [EMAIL PROTECTED]
> Unsubscribe: [EMAIL PROTECTED]
> ---------------------------------------------------------------------
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/17folB/TM
--------------------------------------------------------------------~->
---------------------------------------------------------------------
Home : http://groups.yahoo.com/group/active-server-pages
---------------------------------------------------------------------
Post : [EMAIL PROTECTED]
Subscribe : [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
---------------------------------------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/active-server-pages/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/