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

Make .match() similar to Dart SDK's RegExp #38

Open
kaisellgren opened this issue May 7, 2013 · 1 comment
Open

Make .match() similar to Dart SDK's RegExp #38

kaisellgren opened this issue May 7, 2013 · 1 comment

Comments

@kaisellgren
Copy link
Contributor

The match() method has the parameter caseInsensitive. Can we make this the same as Dart SDK's RegExp constructor, which has a caseSensitive parameter?

I find myself constantly specifying the wrong named parameter because of this. So, nowadays I'm always trying to remember which way it was and do I need true or false here.

This adds burden to the executive control of my working memory (cognitive load). Therefore this is a UX issue (maybe tag with Enhancement).

Maybe we could even allow the user to specify either of those?

@vadimtsushko
Copy link
Owner

I think maybe change match() API altogether.
Make it match(String fieldName, Pattern pattern)
So methods would accept or String pattern (with default values for multiline and caseSensitive) or RegExp with these params set.

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

2 participants