xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomy <thomas.palf...@gmail.com>
Subject Re: patternMatch and regular expression syntax
Date Wed, 02 Sep 2009 07:31:00 GMT

Hi Alberto,

I use the last version in the download area, i guess it's the 3.0.1
available here : http://xerces.apache.org/xerces-c/install-3.html#Unix
Maybe i misunterstood the use of patterMatch method, i checked the source
code and it doesn't seem to use regexp ...
Is there something to do with regExp before using them like a pattern, like
a compile method like in java ?

thanks for your answer and your help !


Alberto Massari wrote:
> 
> Hi Thomy,
> I tested your regex with the current trunk of Xerces 3.0, and it works; 
> which version are you using?
> 
> Alberto
> 
> Thomy wrote:
>> Hi !
>>
>> I'm trying to use XMLString::patternMatch to check syntax of XMLString
>> gived
>> by a user.
>>
>> i made a pattern to recognize an id : PAG_[0-9]{1,}
>> My test id is PAG_1
>> i call patternMatch with an XMLString containing "PAG_1" and check with
>> this
>> pattern :
>> const XMLCh AltoXMLConst::validPage[] =
>> {
>> 	chLatin_P,chLatin_A,chLatin_G,chUnderscore, chOpenSquare, chDigit_0,
>> chDash, chDigit_9, chCloseSquare, chOpenCurly, chDigit_1, chComma,
>> chCloseCurly, chNull
>> };
>>
>> it's return -1. I guess i have a syntax problem because if i made a
>> pattern
>> which is "PAG_" it's return 0.
>> Is there a problem with my syntax of "any number from 1 to infinite", how
>> to
>> write it well ?
>>
>> Thx in advance for your help
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/patternMatch-and-regular-expression-syntax-tp25239749p25252778.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.


Mime
View raw message