SafeTex
(SafeTex)
February 16, 2013, 8:28pm
1
Hello
Can anyone explain what this simple bit of code from the online help actually does
Match coordinated words, for example to match “both… as well” we could write:
bothand
as
well
I think it will find an incorrect sentence like
“Give it to both John and as well”
Am I correct?
Thanks
dnaber
(Daniel Naber)
February 16, 2013, 9:34pm
2
On Sa 16.02.2013, 12:28:27 you wrote:
I think it will find an incorrect sentence like
“Give it to both John and as well”
Am I correct?
The original rule has one more token at the end, namely “as”.
It matches “both … as well as”, but not “both … and … as well as”. I
have updated the example to reflect the actual rule.
Example that is matched:
“He is both very rich as well as handsome.”
Your example is not matched, as the “and” matches, but it’s an exception so
the rule won’t match.
Regards
Daniel
–
http://www.danielnaber.de
SafeTex
(SafeTex)
February 17, 2013, 8:00am
3
Hi Daniel
It is interesting to note that the rule captures 2 words between one pair of !
both … and
Cos, in the help pages, I had also read
… as the text is split into words, you need to list each word separately as a token. This will not work:
think about
So my follow up question is which one is right?
With token skip and token exception, is the one word per token limit obsolete?
Hope you understand
Thanks
dnaber
(Daniel Naber)
February 17, 2013, 2:16pm
4
On So 17.02.2013, 00:00:58 you wrote:
With token skip and token exception, is the one word per token limit
obsolete?
The point of that example in the documentation is to make sure nobody puts
two tokens in one “token” element and then thinks it will match that
sequence, because that won’t work.
Regards
Daniel
–
http://www.danielnaber.de