better relaxer, don't use global RE's with test() (Fixes #1)