Variables in RegEx & Is this an acceptable use for DGraph

It is possible to use variables and regexp. This works for me:
regexp(predicate, /$variable/)