Basta alterar /testregexp/
com $0 ~ "testregexp"
Exemplo simples:
$ echo "a/b/c" | awk ' ( $0 ~ "a/b/c" ) { print "we have a winner" ; }'
we have a winner
outro exemplo
regexp='some regexp "with /lots/ of double quotes" "everywhere"'
awk -v reg="${regexp}" ' ( $0 ~ reg ) { action here... }'