The attribute pattern
specifies a regular expression pattern to be searched for or matched. TAN regular expressions include an extended syntax, most noted by the special escape character \k{}.
For more see the section called “Regular Expressions” and https://www.w3.org/TR/xpath-functions-30/#regex-syntax
Formal Definition
Defined at:
TAN-core.rng
Used by: ~func-replace
, ~defn-tok-def
Example 8.50. @pattern
<definitions>
<comment when="2016-02-22-05:00" who="park">The following token definition treats the
following as words: sequences of letters, any individual character that is neither a
letter nor a space (i.e., punctuation).</comment>
<token-definition src="eng-us" pattern="[-\w]+"/>
<person xml:id="park">
.........
</person>
.........
</definitions>
Note | |
---|---|
Taken from ringoroses.div.1 |
Example 8.51. @pattern
<definitions>
<token-definition pattern="[\w]+"/>
<lexicon xml:id="LSJ">
.........
</lexicon>
.........
</definitions>
Note | |
---|---|
Example 8.52. @pattern
<definitions>
.........
<comment when="2016-02-22-05:00" who="park">The following is
equivalent to @which = 'letters'</comment>
<token-definition src="eng ger" pattern="\w+"/>
<person xml:id="park">
.........
</person>
.........
</definitions>
Note | |
---|---|
Taken from ringoroses.01+03.token.1 |
Example 8.53. @pattern
<item>
<token-definition pattern="[\w]+"/>
<name>letters</name>
.........
</item>
Note | |
---|---|
Taken from token-definitions.TAN-key |