"Does Not Contain" Pattern

Infosphere's Quality Product

Moderators: chulett, rschirm

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

"Does Not Contain" Pattern

Post by U »

Given that the negation operator (!) cannot be user with a floating position specifier (* or #), how might one construct a pattern to identify "string that does not contain a colon character"?

We tried to use !*\: but that ran into the problem mentioned above.

Thank you for your time.
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

Have you tried it without the floating position specifier?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

stuartjvnorton wrote:Have you tried it without the floating position specifier?
Assuming you mean !\: would not that identify only that the first character is not a colon?
Similarly, *!\: will search for any character that is not a colon and stop as soon as one is found.

Neither of these satisfies "does not contain colon". I shall devote some brain cells to the question.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
U
Participant
Posts: 230
Joined: Tue Apr 17, 2007 8:23 pm
Location: Singapore

Post by U »

I tried without the asterisk, but the behaviour was as Ray suggested.
stuartjvnorton
Participant
Posts: 527
Joined: Thu Apr 19, 2007 1:25 am
Location: Melbourne

Post by stuartjvnorton »

Couldn't check before I shot my keyboard off... ;-)


Alternatively, some double-handling might work:

*\:
copy "1" Colon

& [Colon = ""]
; Do the bizz
U
Participant
Posts: 230
Joined: Tue Apr 17, 2007 8:23 pm
Location: Singapore

Post by U »

Yes, that works. Thank you.
Post Reply