[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [TSVN] regex help

From: SteveKing <steveking_at_gmx.ch>
Date: 2005-02-17 22:29:36 CET

Eric J. Smith wrote:
>>This should work to capture your issue numbers:
>>
>>[Ii]ssue(?:(?:,\s*|[Aa]nd\s+|\s+)\#?(\d+))+
>
>
> Ooops, the "and" delimiter part didn't work right. Here is a new version:
>
> [Ii]ssue:?(?:(?:,\s*|\s*,?\s+[Aa]nd\s+|\s+)\#?(\d+))+
>
> This should capture all of these:
>
> issue: 1
> issue #2
> Issue #3,4,5
> Issue 6 and 7
> Issue #8,9, #10, #11 , and #12

Capturing is not the problem here! It's the returned groups! Since
groups are numbered from 0 to X with 0 being the whole match and the 1
being the first group, 2 being the second this will only return the
first bug ID in group 1.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Feb 17 22:30:10 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.