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
Suggestions for improvements in Regex #2460
Comments
Imported From: https://issues.scala-lang.org/browse/SI-2460?orig=1
|
@adriaanm said: |
Lucien Pereira (lpereira) said: Unit tests will come. Can someone tell me what is the rule for test file location in /test/ sub-directories, I have no idea what is the correct location. Thanks. |
Lucien Pereira (lpereira) said: Please let me know if this is correct. |
Willis Blackburn (willisblackburn) said: |
Lucien Pereira (lpereira) said: |
Willis Blackburn (willisblackburn) said: It would be nice to at least get the group-name-aware version of "r". Just replace def r: Regex = new Regex(toString) with def r(groupNames: String*): Regex = new Regex(toString, groupNames: _*) |
@dcsobral said: |
@dcsobral said: |
@dcsobral said: |
@dcsobral said: |
@dcsobral said: |
@dcsobral said: |
I've been using Regex in Scala 2.7 as part of a project and have a couple of suggestions to improve it.
Introduce a new method, findAllMatchIn, that returns a MatchDataIterator. The other find methods of Regex generally have a findXxx and findXxxMatch variants, but in the case of findAllIn, there is only one that returns MatchIterator. To get an iterator over MatchData objects, one must call matchData on the iterator. Making this change would make the findAllIn API consistent with the other find interfaces. Deprecate the matchData method of MatchIterator.
In RichString, introduce an r(groupNames: String*) method to complement the existing .r method, which does not accept group names.
The text was updated successfully, but these errors were encountered: