I don't see how you can use a regex in a template conditional, there are no regex functions allowed in templates...
The very short list of allowed functions is here:
https://www.vbulletin.com/docs/html/...n_conditionals
So you're going to need a plugin to do the back end of whatever it is you need to do.
In a plugin this should give you the current http path (minus the bburl):
Code:
$vbulletin->input->fetch_relpath();