I hate regex (see #833)