modifying regex for valid tokens to stem to prevent invalid range errors