|Dorset holidays||Electronics & DIY||Family History||Hi-Fi History||Misc||Natural History||Wild Food||Walks|
|Contents||Index||About the instructions||About mailing list||Mailing list archive|
Some of the Advanced Search elements are very powerful. Combining two powerful elements can lead to surprises. There are other occasions where elements may not behave as you first expect. Here are a few of these.
For example consider
But if there is another element after the negated set, then the Em pointer is moved to the next element after the negated set.
In particular don't use > to insert something at the end of a line:
This was a line from the Obey file saved from StrongED's List of Widows. I wanted to remove all the window handling detail, that is everything after the /inc. I tried the search expression
"I'll start with the working " "####*$ pattern. With this we try to match the " " against the 'M' of 'MESSAGE...' which fails so we move one character forward to 'e', which also fails etc. until we come to the space after 'Message'
"This succeeds so we try to match '#' against 'S' of 'StrongED_OpenDoc'. Alas that fails so again we move one character forward. We keep doing this until we reach the space after the filename where finally the whole pattern matches.
"In the above case the match position is moved forward immediately when a match fails. With the failing *" "####*$ this is not the case. -->
"The *" "####*$ pattern is handled much the same except that the match position isn't moved forward when " " fails to match. Only when " " matches and '#' fails is the match position moved forward.
"When we come to 'SCSI...' the match position is at the initial 'S'. We try to match " " which fails but because of the '*' the match position is advanced. Instead we simply look at the next character, this goes on until we find the " " after the filename.
"We then try the rest of the pattern '####*$' which also matches so we a match from 'SCSI' to end of line.
Was this page helpful? Please email me and/or rate this page:
Top of page