This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: lookbehind tests
Type: Stage:
Components: Tests Versions: Python 2.3
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: grubert, nnorwitz
Priority: normal Keywords: patch

Created on 2003-02-07 17:08 by grubert, last changed 2022-04-10 16:06 by admin. This issue is now closed.

Messages (2)
msg42720 - (view) Author: engelbert gruber (grubert) * Date: 2003-02-07 17:08
there were none in re_test.py (just in case upload does not work)

*** re_tests.py Fri Feb  7 17:46:50 2003
--- new_test/re_tests.py        Fri Feb  7 17:49:03 2003
***************
*** 548,553 ****
--- 548,560 ----
      ('a(?:b|(c|e){1,2}?|d)+?(.)', 'ace', SUCCEED, 'g1 + g2', 'ce'),
      ('^(.+)?B', 'AB', SUCCEED, 'g1', 'A'),
  
+     # lookbehind: split by : but not if it is escaped by -.
+     ('(?<!-):(.*?)(?<!-):', 'a:bc-:de:f', SUCCEED, 'g1', 'bc-:de' ),
+     # escaping with \ as we know it
+     ('(?<!\\\):(.*?)(?<!\\\):', 'a:bc\\:de:f', SUCCEED, 'g1', 'bc\\:de' ),
+     # terminating with ' and escaping with ? as in edifact
+     ("(?<!\\?)'(.*?)(?<!\\?)'", "a'bc?'de'f", SUCCEED, 'g1', "bc?'de" ),
+ 
      # Comments using the (?#...) syntax
  
      ('w(?# comment', 'w', SYNTAX_ERROR),
msg42721 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-02-13 03:08
Logged In: YES 
user_id=33168

Thanks!  Checked in as Lib/test/re_tests.py 1.32
History
Date User Action Args
2022-04-10 16:06:37adminsetgithub: 37933
2003-02-07 17:08:14grubertcreate