I know what you were trying to say:
The bold part doesn't make sense (it's understood though)
It's just that it's not about regex, you can't match a litteral colon inside the matchtext on an event, regex or not.
Your statement was then implying that octal or hex was the only solutions, as I said I just wanted to make it clear that it wasn't
you could also not use the $ prefix and use $regex without any hex or octal, I just wanted to make that clear.
Note: you don't need to escape a colon in regex anyway