That can be solved with RE's. You will have a harder time making CF's native
RE's library do the trick. On the server-side, I'd use CFX_PCRegEx, (see URL
below). It provides full PERL-esque RE's, which will allow you to get the
job done. Also, by using PERL RE's you can use O'Reilly's "Mastering Regular
Expressions" and any PERL reference which includes material on RE's; not to
mention all the PERL code out there that makes extensive use of RE's.
http://devex.allaire.com/developer/gallery/info.cfm?
ID=47AA9175-9AFE-11D4-AAA700508B94F380&method=Full
On the other hand, you could create similar functionality on the client-side
with JavaScript 1.3+, if you know that the client machines will support
this. The JavaScript and ECMAScript standards have been pretty much
following the PERL RE style, and both are POSIX compliant, so you can still
utilize RE examples from the previously mentioned sources.
http://developer.netscape.com/js/
Steve
-----Original Message-----
From: Jamie Keane [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 14, 2000 12:41 PM
To: CF-Talk
Subject: highlighting strings, with a twist.
Hi all,
I know this has been discussed previously, but I've got a question with a
little quirk in it.
I know there are ways to highlight a string, and basically you REReplace the
string with a copy of itself wrapped in a highlighting <font> tag (or span,
or what have you). The problem is this: What if the string contains HTML
and the highlighter mangles the HTML output? Is there a smart way for the
regexp to do the highlighting but skip over the insides of an HTML tag? In
other words, it would be okay to highlight the label portion of an <A> tag,
but not touch the HREF attribute.
Any assistance would be very appreciated! And if you know a custom tag that
does this, please pass it on my way. Thanks!
--
Jamie Keane
Programmer
SolutionMasters, Inc.
9111 Monroe Rd., Suite 100
Charlotte, NC 28270
www.solutionmasters.com
704.563.5559 x 228 Voice
704.849.9291 Fax
------------------------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists or send a message
with 'unsubscribe' in the body to [EMAIL PROTECTED]