On Sun, 11 Dec 2016 15:14:26 -0600, Anton Treuenfels wrote:
> if ( match($0, /...([^CK].|C[^N]|K[^R]).../, a) ) {
> do_something
> }
>
> which will produce false matches if those two middle characters are not
> always both uppercase alphabetic.
Thanks, after a second thought, I've two additional notes based on your
solution:
[1] `if' is not need here according to the match function's description
in the manual:
Return the position in s where the regular
expression r occurs, or 0 if r is not present...
[2] In order to workaround the failure case, I revise your code into the
following form:
match($0, /...([^CK][A-Z]|C[^N]|K[^R]).../, a) {
do_something
}
Regards
>
> - Anton Treuenfels