[Oberon] Re^2: RX.Tool scope limited to 1 line ?

Gérard Meunier gemeu at free.fr
Tue Mar 20 16:49:40 MET 2007


Easthope a écrit :
> Chris,
> 
> cg> Can this utility eg. find and remove all such 4 lines from 
> a marked frame:
> 
> <anyString> <space> "cat" <anyString>
> <anyString for line 2>
> <anyString for line 3>
> <anyString> <space> "dog"
> 
> ?
> 
> Yes, I expect that Regul can do it ... but I've never 
> tried a similar problem.
> 
> Incidently, if the literals are enclosed with " ", the 
> names needn't be enclosed with < >.  Conversely, 
> if the names are in < >, then the literals, except for 
> the blank, needn't be enclosed.  So these are two 
> simpler notations with the same meaning.
> 
> String " cat" String EOL
> String EOL
> String EOL
> String " dog"
> 
> <String> " " cat <String> <EOL>
> <String> <EOL>
> <String> <EOL>
> <String> " " dog
> 
> Gerard has made improvements since the release 
> of Babel/Regul which I used last.  Would be best 
> to get the improvements but I don't know the 
> release status. 
> 
> Regards,        ... Peter E.
> 
> 
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
> 
> 

Hello,

My last little improvements were made under BlackBox (see Helmut Zinn's 
site). But the latter example works easily under Oberon: in Regul.Panel, 
write

	$ .* cat (.|$)* dog .*

in the Find: field; write nothing in the Repl.: field; mark (F1) the 
text that must be changed; press Find Next and, then, Replace. It's all.

Hint: $ stands for EOL, a dot (.) stands for any character, but not EOL, 
the star (*) marks the repetition of the previous word, a vertical bar 
(|) stands for a logical OR and braces group expressions together. Press 
the Help button and follow the links in the title for further explanations.

Hint 2: If the first line to be deleted is the first line in the text, 
without any EOL before, don't write the first $ in the Find: field.

Gérard


More information about the Oberon mailing list