Re: find and replace again
If you want to use the preset variable %NL%, you have to write it as
> Finally I'll like to add keywords and descriptions to each page
> ^!Replace "<meta name="generator" content="MindManager v4.0.81">"
> >> "%NL%<meta name="Keyword" content="Power tools">" GIWSA
> but this which is all on one line doesn't work. You'll notice I
> haven't set this one to regular expressions. I'm not really sure
> what I'm doing here. I want the metatags on new lines and might
> follow ht intitial keywords one with a description tag which would
> be on another new line. How would that work?
Why do you use a regular expression here? You're only changing plain
> ^!Replace "</TITLE>" >> " - Power Tools Software Discussion
>You can use conditional statements, there are many ways to construct
> this works really well but it begs two questions:-
> a) can i run a command that says if </title> follows List, don't
> replace? I wondered about an IF and skip command here.
them; here is a very simple example:
^!Find "</title> followed by List" [options]
^!IfError LABEL1 Else LABEL2
; if "</title> followed by List" is NOT FOUND...
^!Replace "text1" >> "text2" [options]
; executed in these cases:
; 1. "</title> followed by List" is FOUND (LABEL1 is skipped)
; 2. after the replacement in LABEL1
; ("</title> followed by List" NOT FOUND)
> b) I think someone once said I could run a clip without openingthe
> files each time. I've set screen update currently to off whichspeed
> things up but I don't really need the files to open to run thisAs far as I know, there is no way to use SearchDisk in a clip by now.
> script. How does that work?
You could try fiddling with ^!Keyboard CTRL+D and inserting texts in
the fields using #...#
From Help Clip Language - Find / Replace text
"Use the following commands and functions to search or replace text
in the active document..."
Or else you could investigate a function such as StrReplace... You
would have to find a way to find/identify the textstrings you want to
have written to file. Use Clip Language Document Management or Clip
Language - Disk Files for additional information.
Returns a new string with all occurrences of SubStr replaced with
ReplaceStr according to the settings of the CaseSensitive and
WholeWord parameters. Tab and line-break tokens are automatically
converted to their real characters since version 4.6. Example:
^$StrReplace("o";"?";"NoteTab Pro";True;False)$ -> N?teTab Pr?