Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Scala 2.10.0
    • Component/s: Misc Library
    • Labels:
      None

      Description

      I've been using Regex in Scala 2.7 as part of a project and have a couple of suggestions to improve it.

      1. 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.

      2. In RichString, introduce an r(groupNames: String*) method to complement the existing .r method, which does not accept group names.

        Activity

        Hide
        Daniel Sobral added a comment -

        I'm also removing the arbitrary change of protected scope for MatchIterator's matcher. Such a change would require a deprecation period first, which is just not worth the trouble.

        Show
        Daniel Sobral added a comment - I'm also removing the arbitrary change of protected scope for MatchIterator's matcher. Such a change would require a deprecation period first, which is just not worth the trouble.
        Hide
        Daniel Sobral added a comment -

        Nevermind that last comment... I've just realized why the change was made.

        Show
        Daniel Sobral added a comment - Nevermind that last comment... I've just realized why the change was made.
        Hide
        Daniel Sobral added a comment -

        I created pull request 136 with the patch, minus the deprecation of `matchData`.

        Show
        Daniel Sobral added a comment - I created pull request 136 with the patch, minus the deprecation of `matchData`.
        Hide
        Daniel Sobral added a comment -

        Willis, to get API changes incorporated one needs to bring them up on scala-language mailing list.

        Show
        Daniel Sobral added a comment - Willis, to get API changes incorporated one needs to bring them up on scala-language mailing list.
        Hide
        Daniel Sobral added a comment -

        Closed by commit e3dec9f006ac2631281fb936c4ca206daa8fda5d.

        Show
        Daniel Sobral added a comment - Closed by commit e3dec9f006ac2631281fb936c4ca206daa8fda5d.

          People

          • Assignee:
            Daniel Sobral
            Reporter:
            Willis Blackburn
            TracCC:
            Lucien Pereira
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development