On Nov 12, 2008, at 11:28 AM, Paul wrote: > Two full days of experimenting, reading, expermenting, researching, > experimenting and I can't figure out how to get this done. > > I want to find and replace blocks like the following, using the > <div ... /div> tags as delimiters. The problem seems to be that the > number of paragraphs varies.
We're probably going to need a little more information, specifically on what criteria you want to match. If you want to match any div of the class shown here (and it's always typed the same way), something like this should do the trick: (?s)(<div class="ve mid-108">.*?</div>) The tricks here are that (?s) causes '.' to match newlines, and that .*? is a non-greedy match, so that it will terminate on the first </div> that it finds (so it won't work with nested div's). The class match can of course be more general than what I've shown, but you need to be careful with greed. > > > <div class="ve mid-108"> > <p> > You have used the attribute named above in your document, but > the > document type you are using does not support that attribute for > this > element. This error is often caused by incorrect use of the > "Strict" > document type with a document that uses frames (e.g. you must > use > the "Transitional" document type to get the "target" attribute), > or > by using vendor proprietary extensions such as > "marginheight" (this > is usually fixed by using CSS to achieve the desired effect > instead). > </p> > <p> > This error may also result if the element itself is not > supported in > the document type you are using, as an undefined element will > have no > supported attributes; in this case, see the element-undefined > error > message for further information. > </p> > <p> > How to fix: check the spelling and case of the element and > attribute, > (Remember XHTML is all lower-case) and/or > check that they are both allowed in the chosen document type, > and/or > use CSS instead of this attribute. If you received this error > when using the > <embed> element to incorporate flash media in a Web page, > see the > <a href="http://validator.w3.org/docs/help.html#faq-flash">FAQ > item on valid flash</a>. > </p> > </div> > > I expect that if somebody provides the solution I'll be slapping my > forehead and going "Duh," but I'm stuck. Any generous souls out there? > > Paul --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a specific feature request or would like to report a suspected (or confirmed) problem with the software, please email to "[EMAIL PROTECTED]" rather than posting to the group. -~----------~----~----~----~------~----~------~--~---