Conditional replace with rereplace function: Python Script 0.9.2 vs 1.0.1

Cyrillev
2014-03-29
2014-03-30
  • Cyrillev

    Cyrillev - 2014-03-29

    Hi,

    I use a Python script with conditional replacement:
    Search: (Alain)|(perroquet)|(vert)
    Replace: (?1Elisabeth)(?2chat)?3gris et blanc
    Search --> Replace by
    Alain ---> Elisabeth
    perroquet ---> chat
    vert ---> gris et blanc

    With Notepad++ and Python Script it’s OK
    This texte
    Alain
    perroquet
    vert

    is replaced by
    Elisabeth
    chat
    gris et blanc

    But with Ptyhon Script it’s not OK

    is replaced by
    (?1Elisabeth)(?2chat)?3gris et blanc
    (?1Elisabeth)(?2chat)?3gris et blanc
    (?1Elisabeth)(?2chat)?3gris et blanc

    Can you help me ?

    Cyrillev

     
  • Dave Brotherstone

    You're right, sorry that's a bug. I'd missed a flag on the replacement that enables this form of replacement. I've added a fix and a test, I'll do a release later on today.

    Thanks for reporting.

    Dave.

     
  • Dave Brotherstone

    v1.0.2 fixes this, and is now available for download (you can just download the MSI again and reinstall).

     
  • Cyrillev

    Cyrillev - 2014-03-30

    ok thank you

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks