matches_regex check

This forum contains ProfileStage posts and now focuses at newer versions Infosphere Information Analyzer.

Moderators: chulett, rschirm

Post Reply
U
Participant
Posts: 230
Joined: Tue Apr 17, 2007 8:23 pm
Location: Singapore

matches_regex check

Post by U »

I am trying to get a regular expression to work in a Data Rule. The object is to create a matches_regex check for a date in DMY format with / delimiter.

Code: Select all

placeholder matches_regex "^(0?[1-9]|[12]\d|3[01])/(0?[1-9]|1[012])/((19|20)?\d\d)$"
This works in various online regex testers but not in Information Analyzer data rules. For example the dates 17/11/11 and 17/10/2011 are reported (in View Test Results for the Data Rule Definition) as not meeting the rule, while 19/09/2011 is reported as a match.

Can anyone shed any light on what might be happening?

Thank you for your time.
rjdickson
Participant
Posts: 378
Joined: Mon Jun 16, 2003 5:28 am
Location: Chicago, USA
Contact:

Post by rjdickson »

I know this does not answer your question directly, but according to the documentation, 'is_date' will check for dd/mm/yy and dd/mm/yyyy.

http://publib.boulder.ibm.com/infocente ... 4%65%22%20
Regards,
Robert
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

However is_date does not check for d/m/yyyy, dd/m/yyyy or d/mm/yyyy, or variants with two digit year, all if which U's regex seems to want to check. If I get time I'll verify the results this week.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply