tag:blogger.com,1999:blog-8544609315733972726.post2625091374605603432..comments2008-06-30T19:50:52.884-06:00Comments on OpenOffice.org Ninja: Example regular expressions for WriterAndrew Zhttp://www.blogger.com/profile/10108637160465346326noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-8544609315733972726.post-84024558156296972882008-06-30T19:50:00.000-06:002008-06-30T19:50:00.000-06:00Regarding the double newlines, or the empty paragr...Regarding the double newlines, or the empty paragraph.<BR/>In my text, removing the empty paragraph won't work, because it eliminates the format information of the next line...<BR/><BR/>end of prev paragaraph.<B>new paragraph</B><BR/><B>new paragraph</B><BR/>HEADING 2<BR/><BR/>- would end up as ... -<BR/><BR/>end of prev paragaraph.<B>new paragraph</B><BR/><I>heading 2 with default format</I><BR/><BR/>heading 2 would actually be stripped off its heading formatting and document hierarchy.<BR/><BR/>Such an everyday task, do we have to do it by hand?chucknoreply@blogger.comtag:blogger.com,1999:blog-8544609315733972726.post-76301527769437374862008-06-10T08:42:00.000-06:002008-06-10T08:42:00.000-06:00Interesting article, thanks for all.Interesting article, thanks for all.Juegoshttp://www.quejuegos.orgnoreply@blogger.comtag:blogger.com,1999:blog-8544609315733972726.post-33653457551265499372008-05-13T21:22:00.000-06:002008-05-13T21:22:00.000-06:00To the Anonymous commenter regarding replacing bla...To the Anonymous commenter regarding replacing blank lines....<BR/><BR/>Remember that paragraphs are single lines in Writer (or any Word Processor, for that matter), so the caret (beginning of line) and DollarSign (End of Line) combo (^$) is a blank line, not just a blank paragraph as indicated in the blog entry above.<BR/><BR/>You then want to repeat it (because the RegEx in Writer doesn't have {min,max} features) with a backreference ( use "$1"), with a plus-sign, since you want at least one (contrast this with the asterisk/star ("*") which matches zero or more.<BR/><BR/>You'll want something like:<BR/><BR/>(^$)$1+ as your seaerch pattern.Fionnhttp://www.blogger.com/profile/08804691499081321229noreply@blogger.comtag:blogger.com,1999:blog-8544609315733972726.post-21029285983306476472008-04-08T08:32:00.000-06:002008-04-08T08:32:00.000-06:00I read dozens of pages in forums and did not find ...I read dozens of pages in forums and did not find a so natural thing:<BR/>how can one<BR/>automatically replace all double blanc lines by a single blank line.<BR/>(If configured correctly, whil also<BR/>change a triple repetition of a blank line into a single blanc line).<BR/><BR/>Something so easy in emacs and so difficult in OOW.Anonymousnoreply@blogger.com