Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ranges cause invalid Regex #22

Open
jduncanator opened this issue Aug 30, 2013 · 0 comments
Open

Ranges cause invalid Regex #22

jduncanator opened this issue Aug 30, 2013 · 0 comments

Comments

@jduncanator
Copy link

When using the .Range method with range arrays greater than 3, it causes invalid Regex to be output. An example can be seen with the following snippet taken from a Unit test and modified:

var verbEx = VerbalExpressions.DefaultExpression;
object[] range = new object[4] { 1, 6, 7, 12 };
verbEx.Range(range);

That expression outputs [1-126-7] which is obviously invalid regex. Not sure what is supposed to happen here? Maybe throw an ArgumentException?

kjellski added a commit to kjellski/CSharpVerbalExpressions that referenced this issue Sep 9, 2013
- added test to make sure an ArgumentOutOfRangeException is thrown when the params [] has a length bigger then 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant