Feature #851
Regular expression syntax
| Status: | Closed | Start date: | 2009-06-29 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | - | |||
| Target version: | - |
Description
We currently use the regexp syntax defined by XML Schema part 2, which is Perl-like. The availability of regexp libraries for this syntax is unknown. An alternative might be this syntax: http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap09.html There might be others as well.
Need to make a decision on which syntax to use.
History
Updated by Graham Moore over 2 years ago
Do more research on this.
Updated by Lars Marius Garshol over 2 years ago
XPath 2.0 and XQuery 1.0 use an extended version of the XML Schema regular expressions: http://www.w3.org/TR/xpath-functions/#regex-syntax SPARQL uses the same regexp language, by reference: http://www.w3.org/TR/rdf-sparql-query/#funcex-regex
These extensions do not appear to be of any use to us in TMCL, since they are primarily concerned with extending the regular expressions to search within strings and not only match entire strings. However, we only need matching of whole strings.
Xerces 2 contains an implementation of both XML Schema and XQuery/XPath regexps: http://xerces.apache.org/xerces2-j/javadocs/xerces2/org/apache/xerces/impl/xpath/regex/RegularExpression.html
Tried to find more implementations, but had a hard time of it. James Clark apparently made one at some point.
Apparently IEEE implementations don't follow the standard 100%: http://articles.techrepublic.com.com/5100-10878_11-1050916.html The main implementation appears to be this one, which seems to have forked into several different ones by now: http://arglist.com/regex/
So far the choice of XML Schema regexps seems sound.
Updated by Lars Marius Garshol over 2 years ago
- Status changed from New to Closed
The Seattle meeting proposed choosing the XPath 2.0 syntax, but editors rejected this for the sake of simplicity.
Topic Maps Lab