Hi everyone, I am in need of yet more regex help.
What I want to do is remove any empty tags or tags with white spaace within them from my page. The Regex that I have created is the following:
Basically it says select any tag that is not an end tag, or a comment, or an input item, or a break or a image or a meta tag or a horizontal rule
and only contains spaces
and its closing tag. This script works within dreamweaver but does not work within PHP. An earlier version of this regex is:
this works in PHP but only where the tags contain no characters between them, on the other hand it works in dreamweaver where there is more than two spaces.
If someone could point out where I am going wrong that would be great. Also if somebody could offer some ideas on how I could select a tag that does not close or comes across another tag of the same sort that is open, ie:
would find the fist strong because there is improper nesting, consequintly I would like to do the same on the other side.
Anyway I can figure out how to do it with what I know of regex's however it would select all the text upto the opening tag, ie <strong>sdfsfdssfd when what I want is simply <strong>.