Re: [Clip] Processing directory of files: Solved probs, Regex woes continue
- Hi Alan,
At 10:28 AM 05/03/2000 +0200, you wrote:
>Hi ntb-clips,Jody explained this to us several months ago and I will explain it as I
>Further to my cry for help yesterday, Im pleased to report that I have
>made some strides in choosing the directory and processing files in
>However my regular expression search and replace woes continue.
>Does anyone have some advice on using regex in notetab so that it
>performs as intended?
>Specifically, as I mentioned in last post, I wish to choose every
>instance of "<!--.*-->" with ""
>I hope Ive got the syntax right. the period should represent any
>character and the asterisk should represent zero or more of any
understand it. It does appear that you have the syntax correct. When
using regular expressions in NoteTab to replace all occurrences of a
pattern, the search engine finds the first occurrence that matches the
expression and then it *locks* that match in and replaces all occurrences.
The result is that other possible regular expression matches for your
search are not replaced. If you run the clip again it will find the next
match and replace all occurrence of it and run it again for the next one
and so forth. The solution to this problem is to make a looping clip like
^!Replace "<!--.*-->" >> "" WAS
^!IfError Exit Else Skip_-1
This code will keep looping back as long as the Replace code finds the
match. When it fails to find a match the loop will end.
- Hi Larry,
> When using regular expressions in NoteTab to replace allThat was fixed in one of the 4.8 versions. NoteTab now
> occurrences of a pattern, the search engine finds the first
> occurrence that matches the expression and then it *locks* that
> match in and replaces all occurrences.
"refreshes" the search criteria to the original when using
RegExp. The wildcards, etc. (if there is an etc. <g>) go
back to their regular meaning and not the criteria that was
Subscribe, UnSubscribe, Options