; File with batchs for alternative Find & Replace ; for extension AltSearch.oxt for OOo Writer ; Charset: UTF-8 ; ; v1.2 7/08 ; ; Syntax: ; Lines which do not begin with some master command will be ignored. ; Master command must be bounded in [] and must be at the beginning of the line. ; There can be spaces in front of master command, everything behind it will be ; interpreted as parameters. ; ; Description of master commands: ; [Name] - batch name (referred to as parameter) - single batch begins ; always this master command. The end of batch is determinated by next ; occurrence of command [Name] or [End] for last valid batch. ; ; [Find] - searched expression - at execution of batch parameter will be ; transferred to the field "Search for" ; [Replace] - replaced expression - at execution of batch parameter will be ; transferred to the field "Replace" ; [Parameters] - parameters of searching and replacing - empty string matches ; setting of all parameters to false, citation the parametr's name ; will set to true. ; Accepted parameters: ; MatchCase WholeWord ParaStyles Regular ; CurrSelection Backwards MsgOff NoSummary ; ; [Command] - determine mode of executing searching and replacing - ; Accepted parameters: Find FindAll Replace ReplaceAll Count ; ; In future there could also be instructions for cursor's movement, ; setting of bookmark according to cursor and restoration cursor ; in accordance to bookmark etc. ; ; [End] - indicates the end of last valid batch - everything which be after ; that will be ignored. ; ; ************************************************************ [Name] Html [Sel.] Primitive conversion to Html tags for selected block ; the same parameters for all [Parameters] MsgOff Regular CurrSelection ; bold [Find][:::CharWeight::] [Replace]& [Command] ReplaceAll ; italic [Find][:::CharPosture::] [Replace]& [Command] ReplaceAll ; Hyperlinks [Find][:::HyperLinkURL::] [Replace]& [Command] ReplaceAll ; Add tags of paragraphs [Find]^.*$ [Replace]

&

[Command] ReplaceAll ; Remove redundant ends-starts of identical tags in sequence [Find]||

[Replace] [Command] ReplaceAll [Name] Text [Sel.] Join paragraphs non separated by empty paragraphs ; block of empty paragraphs replace by one empty par [Find]\p{2,} [Replace]\p\p [Parameters] MsgOff Regular CurrSelection [Command] ReplaceAll ; remove spaces and tabs on the starting and enddin of paragraphs [Find](^( *\t*)*|( *\t*)*$) [Replace] [Command] ReplaceAll ; remove ends of paragraphs [Find]\p [Replace] [Command] ReplaceAll ; remove space at the beginning paragraph behind of block empty paragraphs [Find]^ [Replace] [Command] ReplaceAll [Name] Text [Sel.] Separate non empty paragraphs by empty par [Find]^.+$ [Replace]&\p [Parameters] MsgOff Regular CurrSelection [Command] ReplaceAll ; separator [Name] [Name] Text [All] Convert date from yyyy-mm-dd to dd.mm.yy [Find](\d{2,2})(\d{2,2})-(\d{1,2})-(\d{1,2}) [Replace]\4.\3.\2 [Parameters] MsgOff Regular [Command] ReplaceAll [Name] Text [All] Convert date from dd.mm.yyyy to yy-mm-dd [Find](\d{1,2})\. *(\d{1,2})\. *(\d{2,2})(\d{2,2}) [Replace]\4-\2-\1 [Parameters] MsgOff Regular [Command] ReplaceAll [Name] Text [All] Write out all Hyperlinks to new file [Find][:::HyperLinkURL::] [Replace]Link \i, on page \I: \D\C{Example}\h&\h{\u}\C (URL: \C{Example}\u\C)\C{Example}\p\h\R [Parameters] MsgOff Regular [Command] ReplaceAll [Name] Text [All] Write out all Notes to new file [Find][::Note::] [Replace]Note &\i, on page \I, Content:\D\C{Example}\C\n\o\p\p\R [Parameters] MsgOff Regular [Command] ReplaceAll [Name] Text [All] Write out all Pictures to new file [Find][::Picture::] [Replace]Picture \i, on page \I, Name of picture: \C\O\C{Example}&\p\p\C\R [Parameters] MsgOff Regular [Command] ReplaceAll [Name] Text [All] Write out all Tables to new file [Find][::TextTable::] [Replace]Table \i, on page \I, Name of table: \C\O\C{Example}\p&\p\p\C\R [Parameters] MsgOff Regular [Command] ReplaceAll [Name] Text [All] Write out all Text Frames to new file [Find][::TextFrame::] [Replace]Frame \i, on page \I, Name of Text Frame: \C\O\C{Example}\p&\p\p\C\R [Parameters] MsgOff Regular [Command] ReplaceAll [End]