Oxygen XML Developer uses the Java regular expression syntax. It is
similar to that
used in Perl 5, with several exceptions. Thus,
Oxygen XML Developer does not support the
following constructs:
- The conditional constructs (?{X}) and
(?(condition)X|Y).
- The embedded code constructs (?{code}) and
(??{code}).
- The embedded comment syntax (?#comment).
- The preprocessing operations \l, \u,
\L, and \U.
There are some other notable differences that may cause unexpected results, including the following:
- In Perl, \1 through \9 are always interpreted as back
references; a backslash-escaped number greater than 9 is treated as a back reference if at
least that many sub-expressions exist, otherwise it is interpreted, if possible, as an
octal escape. In this class octal escapes must always begin with a zero. In Java,
\1 through \9 are always interpreted as back
references, and a larger number is accepted as a back reference if at least that many
sub-expressions exist at that point in the regular expression, otherwise the parser will
drop digits until the number is smaller or equal to the existing number of groups or it is
one digit.
- Perl uses the g flag to request a match that resumes where the last
match left off.
- In Perl, embedded flags at the top level of an expression affect the whole expression.
In Java, embedded flags always take effect at the point at which they appear, whether they
are at the top level or within a group; in the latter case, flags are restored at the end
of the group just as in Perl.
- Perl is forgiving about malformed matching constructs, as in the expression
*a, as well as dangling brackets, as in the expression
abc], and treats them as literals. This class also accepts dangling
brackets but is strict about dangling meta-characters like +,
? and *.