look-behind fixed width issue (package re)

P

Peng Yu

Hi,

It seem that the current python requires fixed-width pattern for look-
behind. I'm wondering if there is any newly development which make
variable-width pattern available for look-behind.

Thanks,
Peng
 
M

MRAB

Hi,

It seem that the current python requires fixed-width pattern for look-
behind. I'm wondering if there is any newly development which make
variable-width pattern available for look-behind.
The re module is currently being worked on, but unfortunately it won't
appear until Python 2.7. Variable-width look-behind is one of the
improvements.
 
G

Gerhard Häring

MRAB said:
The re module is currently being worked on, but unfortunately it won't
appear until Python 2.7. Variable-width look-behind is one of the
improvements.

Most probably a backport to Python 2.6 or even 2.5 under a different
module name like re_ng wouldn't be too difficult to do for anybody that
needs the new functionality and knows a bit about building extension
modules.

-- Gerhard
 
P

Peng Yu

Most probably a backport to Python 2.6 or even 2.5 under a different
module name like re_ng wouldn't be too difficult to do for anybody that
needs the new functionality and knows a bit about building extension
modules.

I did a google a search. But I don't find any document that describe
it. Does it have almost the same functionality as the re package that
will be in Python 2.7? Where is the decumentation of it?

If I just need variable width look-behind, I just replace re with
re_ng on python 2.5 or 2.6, right? Is re_ng available on python 2.4?

Thanks,
Peng
 
S

Steven D'Aprano

I did a google a search. But I don't find any document that describe it.
Does it have almost the same functionality as the re package that will
be in Python 2.7? Where is the decumentation of it?

If I just need variable width look-behind, I just replace re with re_ng
on python 2.5 or 2.6, right? Is re_ng available on python 2.4?

re_ng doesn't exist yet, because Python 2.7 doesn't exist yet. 2.6 has
only just come out -- it will probably be at least a year before 2.7 is
out, and only then might people start back-porting the new re engine to
2.5 or 2.6.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top