Well looking for pairs of quotes could still leave you in the middle of a tag.... take this string :-
This is a string <img src="image.gif" That'll still not work in the browser. You want to look for pairs of < and >, if you're in between them then you need to find the end of the tag, if not, then you don't. Alternatively strip out all of the HTML tags. I have a function that'll do this - can dig it out if you need it. Dan www.diado.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 23 September 2004 02:23 To: [EMAIL PROTECTED] Subject: Re: [ASP] Counting "s What is an example of the string you are grabbing? Soren Moshe Tapnack <[EMAIL PROTECTED]> 09/22/2004 05:08 PM Please respond to active-server-pages To: [EMAIL PROTECTED] cc: Subject: [ASP] Counting "s Hi all I have a script drawing the first X chars for a descriotion of a product. After that, there's a link to a page. Th thing is that sometimes, on the X-th char, its in the middle of a <img> tag - in which case both the image wont show (except for the dreaded X), and also - the "more" link wont work, because the brwoser thinks its still in the <img> tag. So I thought a way to overcome this would be to count apostophes in th string. If its even - then its fine, and its odd, there is a tag that's open, so I better insert a "> to close the tag. That would at least allow the "more" link to show properly, but it still doesn't solve the "missing" image issue... Also - I ran into trouble looking for " - cos everytime you have to use doubles..... Any tips? Thanks! Moshe --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links [Non-text portions of this message have been removed] --------------------------------------------------------------------- Home : http://groups.yahoo.com/group/active-server-pages --------------------------------------------------------------------- Post : [EMAIL PROTECTED] Subscribe : [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] --------------------------------------------------------------------- Yahoo! Groups Links ------------------------ Yahoo! Groups Sponsor --------------------~--> $9.95 domain names from Yahoo!. Register anything. http://us.click.yahoo.com/J8kdrA/y20IAA/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/
