[plt-scheme] Odd behaviour of #px regexps

From: Eli Barzilay (eli at barzilay.org)
Date: Sun Feb 28 17:37:59 EST 2010

On Feb 28, Norman Gray wrote:
> I would have expected the last one to return ("~X"), too.  Am I
> being very dense and forgetting a meaning for "~" in a pregexp?
> There's no mention of '~' on the relevant documentation page, so I'm
> _fairly_ sure it's not a metacharacter.

Looks like a bug.  (It's easy to try it with a different character and
see that it still fails.)

Here's a smaller example:

  (regexp-match #px".\\p{L}" ".X")

this returns a string that has `X' followed by a garbage character
(usually NUL).

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!


Posted on the users mailing list.