|
From: | Juergen Sauermann |
Subject: | Re: [Bug-apl] Suggestion for Quad-RE |
Date: | Wed, 11 Oct 2017 15:15:45 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
Hi Elias, I understand your case but I am afraid that 1↓ is the wrong approach in general. It happens to work in special cases (read: 1 level of sub-expressions) but not in general. If I understand libpcre correctly (and I propably don't) then a general regular _expression_ RE is a tree whose structure is determined by the nesting of the parentheses in RE, and the result of a match follows the tree structure. If the tree has only a single level (so it has a root and only one level of children of the root) then you can (mis-)interpret the children as an array and dropping the root (by means of 1↓ ) happens (by chance) to return the children. But it remains incorrect because the functions to access tree-like nested values should be ⌷, ⊃, and ⊂ and not ↑, ↓, or []. Best Regards, /// Jürgen On 10/11/2017 07:14 AM, Elias Mårtenson
wrote:
|
[Prev in Thread] | Current Thread | [Next in Thread] |