[plt-scheme] pregexp.ss multiple matches (something)*

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Oct 8 07:24:47 EDT 2007

At Sun, 7 Oct 2007 22:04:41 +0100, "Cyprien Nicolas" wrote:
> (require (lib "pregexp.ss"))
> (pregexp-match "^(\\d+)(?:[., ](\\d+))*$" "123,456,789,010")
> 
> The result is ("123,456,789" "123" "010")
> 
> And I would like to get ("123,456,789" "123" "456" "789" "010")
> 
> I only get the last matched text.
> That behavior is not explained in the documention, is that a bug ?

It's not explained with `pregexp-match', but it's explained in the docs
for `regexp-match' in the MzScheme manual. Since version 360,
`pregexp-match' is just another name for `regexp-match'.

Meanwhile, we are addressing this kind of documentation problem by
re-writing all of the docs for v4.0...

Matthew



Posted on the users mailing list.