like: how to not match ^ in string

https://code.kx.com/q/cookbook/regex/

Is there a way to not match ^ in a string?

#3 works, but I would like (no pun intended) something more like #4

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #d0d2da; background-color: #161821; background-color: rgba(22, 24, 33, 0.95)}span.s1 {font-variant-ligatures: no-common-ligatures}

q)a:(“aapl”;“zb^a”)

q)a like “*^^*”     /#1

00b

q)a like “*^*”      /#2

01b

q)not a like “*^*”  /#3, hack

10b

q)a like “*^^*”    /#4, doesn’t work as expected

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #d0d2da; background-color: #161821; background-color: rgba(22, 24, 33, 0.95)}span.s1 {font-variant-ligatures: no-common-ligatures}

'“*^^*”

p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 13.0px Menlo; color: #d0d2da; background-color: #161821; background-color: rgba(22, 24, 33, 0.95)}span.s1 {font-variant-ligatures: no-common-ligatures}

Hi Ag,

Perhaps I’m misunderstanding your requirement - would something like this suffice?

q)not “^” in/: a

10b

This checks that the character “^” doesn’t appear in any of the strings in the string list to the right  ->  each-right(:)

Hope this helps!

Matt