public void RemoveModifier_RemoveModifierI_RemovesCase()
        {
            verbEx.AddModifier('i');

            verbEx.RemoveModifier('i');
            var regex = verbEx.ToRegex();

            Assert.IsFalse(regex.Options.HasFlag(RegexOptions.IgnoreCase), "RegexOptions should now have been removed");
        }
        public void RemoveModifier_RemoveModifierM_RemovesMulitilineAsDefault()
        {
            var regex = verbEx.ToRegex();

            Assert.IsTrue(regex.Options.HasFlag(RegexOptions.Multiline), "RegexOptions should have MultiLine as default");

            verbEx.RemoveModifier('m');
            regex = verbEx.ToRegex();

            Assert.IsFalse(regex.Options.HasFlag(RegexOptions.Multiline), "RegexOptions should now have been removed");
        }
        public VerbalExpression RemoveModifier(string modifier)
        {
            switch (modifier)
            {
            case "i":
                _modifiers &= ~RegexOptions.IgnoreCase;
                break;

            case "m":
                _modifiers &= ~RegexOptions.Multiline;
                break;

            case "s":
                _modifiers &= ~RegexOptions.Singleline;
                break;

            case "x":
                _modifiers &= ~RegexOptions.IgnorePatternWhitespace;
                break;
            }

            _verbalExpression.RemoveModifier(modifier.ToCharArray(0, 1)[0]);
            return(this);
        }