Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-892

RegexTool#find() returns the capturing groups for only the first match

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 7.4-milestone-1
    • Fix Version/s: 7.4-milestone-2
    • Component/s: Velocity
    • Labels:
      None
    • Tests:
      Unit
    • Similar issues:

      Description

      The following shows the problem:

      {{velocity}}
      #set ($statement = 'one :two three (:four) five :six seven=:eight')
      #foreach ($item in $regextool.find($statement, ':(\w+)'))
        * $item.getGroup() , $item.getStart() , $item.getEnd()
      #end
      {{/velocity}}
      

      The output is:

      * :two , 4 , 8
      * two , 5 , 8
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mflorea Marius Dumitru Florea
                Reporter:
                mflorea Marius Dumitru Florea
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: