Giter Site home page Giter Site logo

regex.search("^(?=ab(de))(abd)(e)", "abde").groups() returns (None, 'abd', 'e') instead of ('de', 'abd', 'e') about mrab-regex-hg HOT 4 CLOSED

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
regex.search("^(?=ab(de))(abd)(e)", "abde").groups() returns (None, 'abd', 'e') instead of ('de', 'abd', 'e')

from mrab-regex-hg.

Comments (4)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
There's an compatibility problem with this one.

When talking about the re module in Python tracker issue #725149, msg15568, it 
says:

"""it would be better to move toward compatibility 
with pre (which after all was the official Python regex engine 
before sre), rather than to remain partly compatible with Perl."""

and regex is supposed to be compatible with the re module.

Otherwise, I'd agree with you.

Perhaps it's time to forget about 'pre' and just follow Perl, if that's what 
other regex implementations do.

Original comment by [email protected] on 14 Jan 2012 at 1:19

from mrab-regex-hg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
I think that there isn't an compatibility problem with this one, because it 
seems that Python 3.2.2 and 2.7.2 default re library doesn't have this issue.

>>> import re
>>> print(re.search("^(?=ab(de))(abd)(e)", "abde").groups())
('de', 'abd', 'e')
>>>

Original comment by [email protected] on 14 Jan 2012 at 1:44

from mrab-regex-hg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
You're right, it should be doing it.

Original comment by [email protected] on 14 Jan 2012 at 2:23

from mrab-regex-hg.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 12, 2024
Fixed in regex 0.1.20120114.

Original comment by [email protected] on 14 Jan 2012 at 10:53

  • Changed state: Fixed

from mrab-regex-hg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.