Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-9925

Groovy match operator documentation should contain real examples and slashy strings reminder

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Documentation
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.7
    • 3.0.8, 4.0.0-alpha-3
    • None
    • None

    Description

      The 3.0.7 Groovy documentation could be more clear on regex usage with match operators, particularly:

      1. It would be helpful to note here that slashy strings are required for the match operator to work.  `foo ==~ "^\s+$"` will never work.  I know there's a section dedicated to slashy strings; it would be helpful to have a footnote here.
      2. This section could benefit from a better example than `m = text ==~ /match/`.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            paulk Paul King
            afredric Alex Fredrickson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment