Fixed bug in setOptions and changed regex tests