Fri Feb 21, 2020 5:34 pm
Login Register Lost Password? Contact Us


How to retrieve the 2nd matched text using PARSE

Comments and questions related to the Enterprise Control Language

Wed Dec 11, 2019 2:39 pm Change Time Zone

Hi

I have a Patten:
Code: Select all
    PATTERN IntBounds := Int OPT(Ws) Sep OPT(Ws) Int;
    PATTERN ReelBounds := Reel OPT(Ws) Sep OPT(Ws) Reel;
    PATTERN MinMax := OpenP OPT(Ws) (IntBounds | ReelBounds) OPT(Ws) CloseP;

I can retrieve the 1st of the numbers of the pairs of numbers using:
Code: Select all
MATCHTEXT(MinMax/IntBounds/Int)

or
Code: Select all
MATCHTEXT(MinMax/ReelBounds/Reel)


but how does MATCHTEXT retrieve the 2nd of the 'Int' or 'Reel' components of MinMax?
I expect I can re-structure the patters to individually isolate the separate numbers which can then be referenced directly, but this seems a bit of a hack.

Yours
Allan
Allan
 
Posts: 419
Joined: Sat Oct 01, 2011 7:26 pm

Wed Dec 11, 2019 2:43 pm Change Time Zone

Ah answered my own question:

Code: Select all
MATCHTEXT(MinMax/IntBounds/Int[2])
Allan
 
Posts: 419
Joined: Sat Oct 01, 2011 7:26 pm


Return to ECL

Who is online

Users browsing this forum: Bing [Bot] and 1 guest