[regex] more closely emulate real tr