ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with reg expression in message set, toolkit 6.0.2

Post new topic  Reply to topic
 Problem with reg expression in message set, toolkit 6.0.2 « View previous topic :: View next topic » 
Author Message
Bartez75
PostPosted: Wed Sep 09, 2009 5:41 am    Post subject: Problem with reg expression in message set, toolkit 6.0.2 Reply with quote

Voyager

Joined: 26 Oct 2006
Posts: 80
Location: Poland, Wroclaw

I have an xml schema with regular expression for a date time which is:
Code:

(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[012])[- /.](19|20)\d\d(.)([0-2][0-9])(.)([0-5][0-9])(.)([0-5][0-9])(.)[0-9][0-9][0-9][0-9][0-9][0-9]


After I have generated message definition file from it I got an error:

Code:

Simple Type Definition '#tTimeStamp' has a pattern facet with value '(0[1-9]|[12][0-9]|3[01])[-[ ]/.](0[1-9]|1[012])[-[ ]/.](19|20)\d\d(.)([0-2][0-9])(.)([0-5][0-9])(.)([0-5][0-9])(.)[0-9][0-9][0-9][0-9][0-9][0-9]', which is not a valid regular expression.


It is valid according to many web tools that can validate/test reg exp.

It has to work for date time format like: DD-MM-YYYY.HH.MM.SS.nnnnnn
Example could be: 25-06-2009-11.21.34.012345

I'm using broker toolkit 6.0.2

Maybe some of you had this problem?
Something in this pattern is wrong according to toolkit.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Sep 09, 2009 5:59 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Quote:

It has to work for date time format like: DD-MM-YYYY.HH.MM.SS.nnnnnn
Example could be: 25-06-2009-11.21.34.012345


Just to be picky, the delimiter between the Date & the time in your example is different from that in the format above.

As an aside, is there some reason why a non ISO standard format is being used for the timestamp?

It is far easier to use one of the standard formats for this sort of thing.
http://en.wikipedia.org/wiki/ISO_8601

Strangely enough, broker has standard format settings for many of these.

I worked on a project there they used a non standard format for the date/time. After explaining to the relevant parties that there was indeed a standard, they agreed to use them even if it meant some egg on the faces of the software supplier who originally proposed the non standard one.
I didn't have the gall to ask them if they had ever heard of ISO 8601...
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed Sep 09, 2009 6:46 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

This was a problem in v6.0.2. You need to escape a hyphen ( - ) in a character class, because it can sometimes be used to indicate a range ( e.g. [0-9] ). In this case, the escape char should not be required because the hyphen cannot possibly be indicating a character range. Later versions have fixed this.
You need to change this:
Code:
[- /.]

to this:
Code:
[\- /.]
Back to top
View user's profile Send private message
Bartez75
PostPosted: Fri Sep 11, 2009 1:26 am    Post subject: Reply with quote

Voyager

Joined: 26 Oct 2006
Posts: 80
Location: Poland, Wroclaw

Hi kimbert and smdavies99.
Thanks for your answers. I did modification according to your suggestions and it is working now with toolkit 6.0.2
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Problem with reg expression in message set, toolkit 6.0.2
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.