Search code examples
wikipedia

negative lookback regex


Does the wikipedia bot support negative lookback regex? For e.g. I need to change the words "kenia" to "kenya" unless it is not next to names like suresh or ramesh.

(?<!suresh|ramesh) kenia > kenya

Is this possible?


Solution

  • Wiki Bots can be written in almost any programming language. The choice of a language depends on the experience and preferences of the bot writer, and on the availability of libraries relevant to bot development.

    Common Lisp, NodeJS, AWK, Lua, VBScript, Haskell, Java, Microsoft .NET, Perl, PHP, Python, and Ruby have all been used and have supporting libraries. So really, it's more a matter of picking a language that supports your desired endeavor.

    Maybe if you explain in detail what you're looking to accomplish and your own linguistic preferences we can offer you a better idea of how to move forward?

    As a for-instance: how many pages are you seeking to correct? Are there languages you have background in (you seem to have a reasonable idea of the underpinning concepts surrounding RegEx, so I assume yes)? Do you know how to go through the bot approval process once the bot itself is coded (there's a whole process within the Bot Approvals Group already in place in Wiki for this)?

    Sorry; the direct answer to your question is:

    Yes. It's totally possible.