Subject: RE: check the type of the $pattern argument to a regular expression?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sat, 14 Apr 2007 23:36:29 +0100
|
> I would like to check the that the $pattern argument to a
> regular expression in fact follows regular expression rules,
> since regex is not castable I guess the only way to do this
> would be to use regular expressions and perhaps a for-each to
> check that the $pattern argument conforms?
Short of writing a regular expression that only matches valid regular
expressions (which sounds like an interesting exercise for the reader), I
think you'll have to resort to extensions for this one.
Michael Kay
http://www.saxonica.com/
|