[thelist] [ColdFusion] More RegEx Fun

Joshua Olson joshua at waetech.com
Thu Feb 27 14:09:00 CST 2003


----- Original Message -----
From: ".jeff" <jeff at members.evolt.org>
Sent: Thursday, February 27, 2003 2:46 PM


> > http://concepts.waetech.com/unclosed_tags/

> the only thing i was hoping to catch that you didn't was a non-closing tag
> with a trailing slash without the optional leading space.  i know the
> leading space is optional, but without it some browsers hork badly.  so,
i'd
> like to catch <br/> as invalid and convert to <br />.  my guess is this
will
> likely need to be an entirely separate check though.

Jeff,

Change rule 9 to this:

<[[:alpha:]]+([[:space:]]+[[:alpha:]]+[[:space:]]*=[[:space:]]*("([^"]*)"|'(
[^']*)'))*/>

The only difference is that the whitespace portion after the attribute pairs
has been removed.

That should catch what you are looking for.

-joshua






More information about the thelist mailing list