Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > look-behind fixed width issue (package re)

Reply
Thread Tools

look-behind fixed width issue (package re)

 
 
Peng Yu
Guest
Posts: n/a
 
      10-24-2008
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
 
Reply With Quote
 
 
 
 
MRAB
Guest
Posts: n/a
 
      10-24-2008
On Oct 24, 6:29*am, Peng Yu <(E-Mail Removed)> wrote:
> 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.
 
Reply With Quote
 
 
 
 
Gerhard Häring
Guest
Posts: n/a
 
      10-24-2008
MRAB wrote:
> On Oct 24, 6:29 am, Peng Yu <(E-Mail Removed)> wrote:
>> 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.


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

 
Reply With Quote
 
Peng Yu
Guest
Posts: n/a
 
      10-24-2008
> 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
 
Reply With Quote
 
Steven D'Aprano
Guest
Posts: n/a
 
      10-24-2008
On Fri, 24 Oct 2008 07:43:16 -0700, Peng Yu wrote:

>> 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?


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.


--
Steven
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! Fixed width table with a 100% width image in it is assuming theimages intrinsic size, although it does shrink the image satya.komatineni@gmail.com HTML 1 12-29-2007 08:32 PM
CSS question: Using height/width at 100% with fixed-width borders/margin/padding cera HTML 1 08-18-2007 02:59 AM
fixed-width column and variable-width columns mixed ssk HTML 5 10-30-2006 07:50 AM
Free Fixed-Width/Fixed-Pitch fonts? johnp HTML 4 05-23-2005 06:14 AM
Fixed layout width based on browser window width msswasstastic@aol.com HTML 11 01-28-2005 07:36 AM



Advertisments