RX.Tool scope limited to 1 line ?
This most frustrating [but essential] Tool ! When ever I try to program it after 6 months away, I need a 2 hour refresher course. I've always understood that the 'scope' is limited to a single line. Ie. that searching & replacing cannot be done over line boundries. Which is a serious limitation. This seems not to be the case. Since there would then be no reason to have in the recognised 'syntax': " c : carriage return " 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" ? I find that only by capturing the tortured labour in an ET.Do script can I justify the use of this frustrating utility. The fact that the original design [with a mod now AFAIK in Edgar's wiki] was restricted to ascii chars, tells a lot. Thanks for any info, ==Chris Glur.
I found that the three search strings here work separately, but when I try to concatenate them, I receive a line too long error. The next step might be to do a replace of the complicated strings with some relatively simple constant string in 1 pass, so that RX doesn't get lost. dog cat frodo lives this and that more nonsense house dog dog cat2 gandolf dies this and that more nonsense house dogs dog cat frodo lives house dog dog cat frodo lives this and that more nonsense house dog dog cat2 frodo lives this and that more nonsense house dogs RX.Search RX.SetSearch { i | t | " " } X1 " cat" { i | t | " " } c RX.SetSearch { i | t | " " } c RX.SetSearch { i | t | " " } " dog" c On 1 March 2007, Chris Glur <easlab@absamail.co.za> wrote:
This most frustrating [but essential] Tool ! When ever I try to program it after 6 months away, I need a 2 hour refresher course.
I've always understood that the 'scope' is limited to a single line. Ie. that searching & replacing cannot be done over line boundries. Which is a serious limitation.
This seems not to be the case. Since there would then be no reason to have in the recognised 'syntax': " c : carriage return "
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"
?
I find that only by capturing the tortured labour in an ET.Do script can I justify the use of this frustrating utility. The fact that the original design [with a mod now AFAIK in Edgar's wiki] was restricted to ascii chars, tells a lot.
Thanks for any info,
==Chris Glur.
-- Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
-- -- Aubrey McIntosh, Ph.D.
Chris, On Thu, Mar 01, 2007 at 04:16:59PM +0000, Chris Glur wrote:
This most frustrating [but essential] Tool !
Babel and Regul written by Gerard Meunier are far more sophisticated. Try them. RX is for simpler tasks.
When ever I try to program it after 6 months away, I need a 2 hour refresher course.
Two hours spent studying Regul will be a better investment.
I've always understood that the 'scope' is limited to a single line. Ie. that searching & replacing cannot be done over line boundries.
True as far as I know for RX. Regul does not have that limitation.
This seems not to be the case. Since there would then be no reason to have in the recognised 'syntax': " c : carriage return "
That allows you to match the whole line to the end rather than a substring of the line.
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"
Easily done with ET. Just mark the text with MR. ET.Search to the mark. Replace with a CR. Repeat or use RepAll. Regards, ... Peter E.
participants (3)
-
Aubrey.McIntoshļ¼ Alumni.UTexas.Net -
Chris Glur -
Peter Easthope