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

RE: [TSVN] Our Issue RegEx needs finetuning...

From: Douglas Stonham <dstonham_at_pennysaverusa.net>
Date: 2005-03-23 21:03:35 CET

On Wed, March 23, 2005 2:53 am, Lübbe Onken said:
> I played a buit with our regex and changed the first line to:
> [Ii]ssue[s]?[:]? #?(\d+)((,? ?#(\d+))?)+

I took the one in your other mail, removed some of the brackets and
changed the spaces to check for any amount of white space rather than just
one (so hitting space twice doesn't break it)

[Ii]ssues?:?(\s*(,|and)?\s*#\d+)+

> It is a bit better, but if you run it on the following test:
> - ---SNIP---
> This closes Issues: #21 and #22
> This closes Issue: #23 #24 and #25
> This closes Issue #26 and issue #27
> issue #28, #29, #30, #31, #32
> issue #33,#34,#35, #36, #37
> - ---SNIP---
>
> It doesn't grab #22 and #25 (OK, that's easy to solve), but it also
> doesn't
> grab #29-#31 and #34-#26, which I don't understand. I think the expression
> is a bit too complicated.

This is running the second regex on the result from the first, yes?

The first regex you mentioned will capture only two values per line if you
look at captured groups. I thought the idea was that you would take the
entire match from this first regex and then do a second (very simple)
regex (something like (\d+)) against it.

Hope that helps,

Douglas

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Mar 23 21:04:08 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.