Re: how to match patterns back from the end of an input string

2019-07-26 Thread B. Li
Thanks Peter. That works for most cases, but, if we need to call sub-scripts recursively (using something like {->CALL(ASPECIALSCRIPT)}), it seems difficult to detect the ending of document in the script ASPECIALSCRIPT. Kind regards, Baoli On 7/26/2019 18:27,Peter Klügl wrote: Hi, there a

Re: how to match patterns back from the end of an input string

2019-07-26 Thread Peter Klügl
Hi, there are no special language elements for this. Howver, there are many other ways to do this (efficiently). You could for example create an annotation on the last part of the document with MARKLAST and then use that nnoation as a starting anchor "@" in an additional rule. Best, Peter

how to match patterns back from the end of an input string

2019-07-26 Thread B. Li
Hi All, I would like to match patterns back from the end of an input string, which may not end at SENTENCEEND. I am wondering whether there are some special tokens like "^" and "$" in normal regular expression in RUTA. Thanks in advance, Baoli