Page 1 of 1

"Does Not Contain" Pattern

Posted: Wed Jun 04, 2014 7:34 pm
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.

Posted: Wed Jun 04, 2014 8:05 pm
by stuartjvnorton
Have you tried it without the floating position specifier?

Posted: Wed Jun 04, 2014 10:15 pm
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.

Posted: Wed Jun 04, 2014 11:08 pm
by U
I tried without the asterisk, but the behaviour was as Ray suggested.

Posted: Wed Jun 04, 2014 11:17 pm
by stuartjvnorton
Couldn't check before I shot my keyboard off... ;-)


Alternatively, some double-handling might work:

*\:
copy "1" Colon

& [Colon = ""]
; Do the bizz

Posted: Thu Jun 05, 2014 7:31 pm
by U
Yes, that works. Thank you.