gerbil
gerbil copied to clipboard
:std/pregexp: produces invalid matches
:std/pregexp seems to produce wrong matches
compared to racket regexp and pregexp, the same regular expresssion produces a wrong matches.
example here: the regexp is supposed to match urls and extract submatches.
the "user" match is wrong on gerbil for the first 2 urls
https://gist.github.com/yanndegat/3790c3ac97823fad7242ba589e3e8a17
the regexp definition is a copy/paste from https://github.com/racket/racket/blob/46a191df038244199f83f2bb1235beb8ca137f9a/racket/collects/net/url-string.rkt#L185
The pregexp syntax is slightly different than racket's regexp syntax. Can you reduce it to a simple regexp that demonstrates the problem?
hi @vyzo
The pregexp syntax is slightly different than racket's regexp syntax.
ok. but is :std/pregexp different from racket's "pregexp" ?
racket's pregexp seems to be the "perl" version of regexps. when i test this regexp with racket/regexp, racket/pregexp or a port to srfi-115, it seems to work properly
not with :std/pregexp
i'll try to see how i could simplify it by removing at least the last parts of the regexp
It is Dorai Sitaram's pregexp package; see https://ds26gte.github.io/pregexp/index.html