summaryrefslogtreecommitdiffstats
path: root/Lib/sre.py
Commit message (Collapse)AuthorAgeFilesLines
* -- reset marks if repeat_one tail doesn't matchFredrik Lundh2000-08-071-13/+11
| | | | | | | (this should fix Sjoerd's xmllib problem) -- added skip field to INFO header -- changed compiler to generate charset INFO header -- changed trace messages to support post-mortem analysis
* final 0.9.8 updates:Fredrik Lundh2000-08-011-1/+4
| | | | | -- added REPEAT_ONE operator -- added ANY_ALL operator (used to represent "(?s).")
* SRE 0.9.8: passes the entire test suiteFredrik Lundh2000-08-011-5/+8
| | | | | | | | | -- reverted REPEAT operator to use "repeat context" strategy (from 0.8.X), but done right this time. -- got rid of backtracking stack; use nested SRE_MATCH calls instead (should probably put it back again in 0.9.9 ;-) -- properly reset state in scanner mode -- don't use aggressive inlining by default
* -- SRE 0.9.6 sync. this includes:Fredrik Lundh2000-07-231-9/+24
| | | | | | | | | | | + added "regs" attribute + fixed "pos" and "endpos" attributes + reset "lastindex" and "lastgroup" in scanner methods + removed (?P#id) syntax; the "lastindex" and "lastgroup" attributes are now always set + removed string module dependencies in sre_parse + better debugging support in sre_parse + various tweaks to build under 1.5.2
* - changed sre.Scanner to use lastindex instead of index.Fredrik Lundh2000-07-021-2/+2
|
* - actually enabled charset anchors in the engine (still notFredrik Lundh2000-07-021-0/+31
| | | | | | | | | | used by the code generator) - changed max repeat value in engine (to match earlier array fix) - added experimental "which part matched?" mechanism to sre; see http://hem.passagen.se/eff/2000_07_01_bot-archive.htm#416954 or python-dev for details.
* today's SRE update:Fredrik Lundh2000-07-011-1/+1
| | | | | | | | -- changed 1.6 to 2.0 in the file headers -- fixed ISALNUM macro for the unicode locale. this solution isn't perfect, but the best I can do with Python's current unicode database.
* the mad patcher strikes again:Fredrik Lundh2000-06-301-0/+13
| | | | | | | | | | | | | | | -- added pickling support (only works if sre is imported) -- fixed wordsize problems in engine (instead of casting literals down to the character size, cast characters up to the literal size (same as the code word size). this prevents false hits when you're matching a unicode pattern against an 8-bit string. (unfortunately, this broke another test, but I think the test should be changed in this case; more on that on python-dev) -- added sre.purge function (unofficial, clears the cache)
* - pedantic: make sure "python -t" doesn't complain...Fredrik Lundh2000-06-301-11/+11
|
* - fixed default value handling in group/groupdictFredrik Lundh2000-06-301-1/+1
| | | | - added test suite
* - fixed split behaviour on empty matchesFredrik Lundh2000-06-301-9/+6
| | | | | | - fixed compiler problems when using locale/unicode flags - fixed group/octal code parsing in sub/subn templates
* - fixed another split problemFredrik Lundh2000-06-291-4/+4
| | | | | | | | | (those semantics are weird...) - got rid of $Id$'s (for the moment, at least). in other words, there should be no more "empty" checkins. - internal: some minor cleanups.
* - fixed splitFredrik Lundh2000-06-291-8/+12
| | | | | | | | | | | | | | (test_sre still complains about split, but that's caused by the group reset bug, not split itself) - added more mark slots (should be dynamically allocated, but 100 is better than 32. and checking for the upper limit is better than overwriting the memory ;-) - internal: renamed the cursor helper class - internal: removed some bloat from sre_compile
* towards 1.6b1Fredrik Lundh2000-06-291-6/+17
|
* Fix bug when the replacement template is a callable objectAndrew M. Kuchling2000-06-181-1/+1
|
* Fredrik Lundh: here's the 96.6% version of SREJeremy Hylton2000-06-011-18/+105
|
* I know this is only a temporary stop-gap measure, but the match() andGuido van Rossum2000-05-021-2/+1
| | | | | | search() functions didn't even work because _fixflags() isn't idempotent. I'm adding another stop-gap measure so that you can at least use sre.search() and sre.match() with a zero flags arg.
* Added Fredrik Lundh's sre module and its supporting cast.Guido van Rossum2000-03-311-0/+46
NOTE: THIS IS VERY ROUGH ALPHA CODE!