Skip to content
Permalink
Browse files

Merge pull request #642 from topazproject/tim/Regexp-char-anchors

Support Regexp anchors \A and \z
  • Loading branch information
alex committed Apr 20, 2013
2 parents 836fff9 + 6552e1b commit 3adadbe7f372d115c8bb374bc87882a7b35b4d22
Showing with 4 additions and 3 deletions.
  1. +0 −2 spec/tags/language/regexp/anchors_tags.txt
  2. +4 −1 topaz/utils/regexp.py
@@ -1,10 +1,8 @@
fails:Regexps with anchors supports B (non-word-boundary)
fails:Regexps with anchors supports z (string end anchor)
fails:Regexps with anchors supports Z (string end anchor, including before trailing \n)
fails:Regexps with anchors supports A (string start anchor)
fails:Regexps with anchors supports $ (line end anchor)
fails:Regexps with anchors supports ^ (line start anchor)
fails:Regexps with anchors does not match ^ after trailing \n
fails:"Regexps with anchors does not match ^ after trailing n"
fails:"Regexps with anchors supports Z (string end anchor, including before trailing n)"
fails:Regexps with anchors supports  (word boundary)
@@ -804,7 +804,10 @@ def compile(self, ctx):
] + [self.items[-1]]).compile(ctx)


POSITION_ESCAPES = {}
POSITION_ESCAPES = {
"A": StartOfString(),
"z": EndOfString(),
}
CHARSET_ESCAPES = {
"d": Property(CATEGORY_DIGIT),
}

0 comments on commit 3adadbe

Please sign in to comment.
You can’t perform that action at this time.