Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- GREP Pattern help wanted
December 20, 2015, 7:39 am
rate this thread
3 out of 5
3 out of 5
on of markup, which does a similar (unwanted) job on all the pages but all
slightly different in content, both the number of lines and the numerals m
ainly. On all the pages, the bits I want removed completely are after a com
mon to all pages opening element that is ID'd and another common to all pag
es closing element. Think <div id="unusual"> ...stuff...</div>, the dots
and stuff not being the same on all pages. What pattern would eliminate the
...stuff... ? I can easily make the closing of the div unique in a prior o
peration if that helps. My find and replace usefully allows grep patterns.
Re: GREP Pattern help wanted
same on all pages. What pattern would eliminate the ...stuff... ? I can easily make the closing of the div unique in a prior operation if that helps. My find and replace usefully allows grep patterns.
Depends on your editor. Some implementations of the Unix Vi editor
allow matching of newlines, and some don't. Dreamweaver's regular
expression capability does. And there's always a balance between the
time it takes to get an expression right, and the time it would take,
with the radio on and a pot of coffee, simply to search for and edit out
the unwanted code.
If you want an easy and quick fix, you might consider changing the div's
ID from "unusual" to "ObsoleteDivToBeDeleted", and use this CSS: