You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Chingfa Wu <ch...@nortel.com> on 2007/07/13 00:06:41 UTC
Problem with regular expression
Hi:
I use window version xerces-c 2.7.0 library on window 2000.
I have an regular expression in my schema as follows:
'([\p{L}\p{Nl}$]|[\p{L}\p{Nl}$][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}$_]*[
\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}_])'.
I ran it again Field_ContinueDemo, I got the following error message:
Value 'Field_ContinueDemo' does not match regular expression facet
'([\p{L}\p{Nl}$]|[\p{L}\p{Nl}$][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}$_]*[
\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}_])'.
If I deleted the first part of the regular expression including "|",
the regular expression becomes:
"([\p{L}\p{Nl}$][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}$_]*[\p{L}\p{Nl}\p{N
d}\p{Mn}\p{Mc}\p{Pc}_])', then xercec-c regular expression matched
successfully.
I think the original regular expression is correct, does anyone know why
the match failed? and how to make it work?
Thanks a lot in advance.
Chingfa
Re: Problem with regular expression
Posted by David Bertoni <db...@apache.org>.
Chingfa Wu wrote:
> Hi:
>
> I use window version xerces-c 2.7.0 library on window 2000.
>
> I have an regular expression in my schema as follows:
>
>
> '([\p{L}\p{Nl}$]|[\p{L}\p{Nl}$][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}$_]*[
> \p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}_])'.
>
> I ran it again Field_ContinueDemo, I got the following error message:
>
> Value 'Field_ContinueDemo' does not match regular expression facet
> '([\p{L}\p{Nl}$]|[\p{L}\p{Nl}$][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}$_]*[
> \p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}_])'.
>
> If I deleted the first part of the regular expression including "|",
> the regular expression becomes:
> "([\p{L}\p{Nl}$][\p{L}\p{Nl}\p{Nd}\p{Mn}\p{Mc}\p{Pc}$_]*[\p{L}\p{Nl}\p{N
> d}\p{Mn}\p{Mc}\p{Pc}_])', then xercec-c regular expression matched
> successfully.
>
> I think the original regular expression is correct, does anyone know why
> the match failed? and how to make it work?
There have been a number of regular expression fixes since Xerces-C 2.7.0
was released. I suggest you update to the latest code in the 2.7 branch
and see if that fixes the problem.
Dave