Okay: I want to, globally and entirely and permanently, convert a CMS from xhtml output to html 4.01. Therefore, I'm trying to use a regular expression (in notepad++) to find self-closing tags that have html equivalents.
I can find self-closing tags in general:however, there are significant portions of script that generate actual xml (not xhtml) markup, which must remain unchanged (well-formed).Code:(<)(\w+)([^>]*\/>)
My approach so far has been to simply limit my expression to known, self-closing xhtml tags: <br/>, <hr/>, <img/>, <link/>, <meta/> (any others?). However, I can't figure out how to add this list of options into my regex.
Any help/ideas would be appreciated!
Thanks.
Edit:
I'm no longer using notepad++ to solve this; I've moved to php (preg_replace). Skip to the end to see where the problem is at now...
thanks



Reply With Quote
).
).
Bookmarks