[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:12:40 CET

Eric J. Smith wrote:

>>The test log message:
>>this is a test logmessage: issue 2222\nIssue #456, 678, #901, #100 #456
>>and the regex string which _should_ match only the issue numbers 2222,
>>456, 678, 901, 100:
>>[Ii]ssue #?([0-9]+)(?:(?:, #?([0-9]+))+)?
>
>
> This should work to capture your issue numbers:
>
> [Ii]ssue(?:(?:,\s*|[Aa]nd\s+|\s+)\#?(\d+))+
>
> It will look for "issue" to start a capture and then take one or more spaces
> or "and" and one or more spaces or "," and one or more spaces and then
> capture the issue number with or without a preceding "#".
>
> There is no need for a two pass regex for issue numbers, it's just a matter
> of becoming competent with the regex syntax. IMO, I don't think you should
> have an option for a two pass regex either. I think options only serve to
> complicate things.

Thanks, but this regex is as good/bad as mine was. It will match my test
log message string, but not return the bug ID's in the group results. At
least not all of them.

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:13:57 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.