QS-Use of universal class (**) in pattern action code - Bug?

Infosphere's Quality Product

Moderators: chulett, rschirm

Post Reply
intelcom
Premium Member
Premium Member
Posts: 25
Joined: Thu Feb 28, 2008 2:05 am

QS-Use of universal class (**) in pattern action code - Bug?

Post by intelcom »

Hi!

I have been developing the rule sets for some time now and never had problems using universal class. For the first time now I need to use ** in the middle of the pattern and I am experiencing problems.

My pattern:
*T | ** | ^ | / | ^ | F

T= Street type
F = Floor

I am trying to identify the floor here (operand [3], [4], [5] and [6]), and I am not interested in operand [2] as this can either be empty (null) or contain some tokens.
The pattern it is not being recognized by QS. I would expect this to work just fine, but nothing happens.

I changed my pattern to
*T | ** (1:1)| ^ | / | ^ | F
and it worked. But then I need to have at least one token between T and first ^,and that is not always the case.

Anyone familiar with this issue and knows what causes it? Could this bee a bug?


Amra
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Could you just look for ^ | / | ^ | F at the end of the record plus a condition that street type is non-empty?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

I would have expected your original pattern to work, but how about using 2 floating specifiers?

*T | *^ | / | ^ | F


Or, as Ray said, why not just look for the ^ | / | ^ | F at the end?
The only reason you would need something as specific as the full pattern for something like floors is if the preceding tokens somehow changed the context of the part you're actually looking for and you needed to parse differently for that specific situation.
Post Reply