Re: [Pywikipedia-l] skip to next occurrence in a page?

2010-11-14 Thread Bináris
Chris, now I understand the mystery of double backslash. That is because you don't use *r *before your regex strings as shown in fixes.py. In that time I did not notice the lack of that r. See http://docs.python.org/py3k/howto/regex.html#the-backslash-plague 2009/11/26 Chris Watkins

Re: [Pywikipedia-l] skip to next occurrence in a page?

2009-11-26 Thread Chris Watkins
Bináris, On Thu, Nov 26, 2009 at 18:27, Bináris wikipo...@gmail.com wrote: Hi! 2009/11/23 Chris Watkins chriswater...@appropedia.org I'm using replace.py to create wikilinks. Usually I want to select only the first occurrence of the search string, and my command works fine for this. I

Re: [Pywikipedia-l] skip to next occurrence in a page?

2009-11-26 Thread Bináris
2009/11/26 Chris Watkins chriswater...@appropedia.org Notice that the -regex parameter is used, and the search text ends with (.*$), which matches the entire rest of the article. Not bad, not bad. :-) Nice solution. \\2 is strange for me, because it should be \2, and it does work that way. I

Re: [Pywikipedia-l] skip to next occurrence in a page?

2009-11-26 Thread Chris Watkins
On Thu, Nov 26, 2009 at 20:39, Bináris wikipo...@gmail.com wrote: 2009/11/26 Chris Watkins chriswater...@appropedia.org Notice that the -regex parameter is used, and the search text ends with (.*$), which matches the entire rest of the article. Not bad, not bad. :-) Nice solution. \\2

[Pywikipedia-l] skip to next occurrence in a page?

2009-11-23 Thread Chris Watkins
I'm using replace.py to create wikilinks. Usually I want to select only the first occurrence of the search string, and my command works fine for this. But sometimes, the first hit is not suitable (e.g. it's part of a book or course title, so I don't want to add the wikilink). If I choose n for