matches_regex should contain alphabets, numbers and Tilda

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

Moderators: chulett, rschirm

Post Reply
adityavarma
Premium Member
Premium Member
Posts: 104
Joined: Thu Jul 12, 2007 11:32 pm
Location: Canada

matches_regex should contain alphabets, numbers and Tilda

Post by adityavarma »

Hi All,

I am trying to create a IA rule for value check for one of the column

Rule:
Field should have all three alphabets ,numbers and Special Character ~ ( tilda) otherwise the rule should fail

Example :
ABCD~2016187~1
ABC~2016187

the above data should be passed and below should be failed
FNAL~
123~

I have tried the below, but still the rule is not working, can you please advise on how to proceed on this

trim(column) matches_regex '^[-a-zA-Z~0-9~0-9]$'
Thanks
Aditya Kutcharlapati
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Looks to me like you need to learn more about constructing regular expressions. For example \d* for zero or more digits, or \d{1,} for one or more digits. There are plenty of tutorials and other resources on the web.

The Posix class [:alpha:] might also be useful; I can't currently check whether these are supported in IA matches_regex checks.
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