Regular Expressions not working

16 views
Skip to first unread message

Prashant Khandagale

unread,
Jan 15, 2025, 9:48:22 AMJan 15
to Smooks Users
Hi Everyone
I am using regular expressions for xml input validation purpose using Rule Based Validations.

I need to validate the length of number and i used below regex
^\d{9}$
but it was not working so i had used [0-9]{9} from smooks example validation-basis for 9 digit number.

I need to validate a date for YYMMDD format and I am using below regex.
^\d{2}(0[1-9]|1[0-2])(0[1-9]|[12][0-9]|3[01])$
but this is not working...I have written a sample code in java to test it...and it is working .
but when i am using rule based validation in smooks it is not working.
Can anyone please help me with this issues? Please point out to right regex generator which will work in smooks.

Thanks,
Prashant

Prashant Khandagale

unread,
Jan 16, 2025, 12:37:56 AMJan 16
to Smooks Users
Hi Cloude,
Anything about regular expression

Mantra

unread,
Jan 17, 2025, 4:04:31 AMJan 17
to smook...@googlegroups.com
The regular expressiong should work as it is . Hope you have define a SimpleType with pattern = <regular expression> in xsd.

Mantra

--
You received this message because you are subscribed to the Google Groups "Smooks Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to smooks-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/smooks-user/94257f18-cfbb-458c-8bd6-e39ead8e2f9fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages