False alarm!<br><br>Very sorry - I found the problem, and it was my mistake, a capitalization error in the text I was searching for. D'oh.<br><br>Thanks for the regexinfo tho, NicDumZ.<br><br>Chris<br><br><div class="gmail_quote">
On Wed, Feb 18, 2009 at 00:29, Chris Watkins <span dir="ltr"><<a href="mailto:chriswaterguy@appropedia.org">chriswaterguy@appropedia.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Still not working :-(.<br><br>I forgot to mention that I'd tried it without the "-regex" and it didn't work. <br><br>I tried both of the commands you suggested, and again got the same result: "No changes were necessary in..."<br>
<br>Going to try updating my several-month-old Pywikipedia. Turns out that last time I tried, I didn't do it right :-).<br><br>Thanks,<br><font color="#888888">Chris</font><div><div></div><div class="Wj3C7c"><br><br>
<div class="gmail_quote">On Tue, Feb 17, 2009 at 20:47, Nicolas Dumazet <span dir="ltr"><<a href="mailto:nicdumz@gmail.com" target="_blank">nicdumz@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi!<br>
<br>
The space is recognized, but in regexes parenthesis have special<br>
meaning, they create a group, and do not match the "()" character.<br>
(the handy regex resource I use for reference :<br>
<a href="http://www.amk.ca/python/howto/regex/" target="_blank">http://www.amk.ca/python/howto/regex/</a> )<br>
<br>
You'll have to escape the parenthesis for python to understand that<br>
you want to match the character, instead of creating a group. You may<br>
have encountered the same kind of issues with brackets, only \[ will<br>
match [ when using the -regex parameter.<br>
<div>"""<br>
python replace.py -regex " \(from wikipedia\)}}" "}}" -file:sfwn1e<br>
-log:sfwlog -summary:"adding argument to {{from wikipedia raw}}<br>
template - Step 2 of 2, change local pagename to Wikipedia pagename"<br>
"""<br>
</div>will work.<br>
<br>
Also, in this case, the -regex parameter is not necessary, because<br>
your appear to match a single given string.<br>
"""<br>
python replace.py " (from wikipedia)}}" "}}" -file:sfwn1e -log:sfwlog<br>
<div>-summary:"adding argument to {{from wikipedia raw}} template - Step 2<br>
of 2, change local pagename to Wikipedia pagename"<br>
"""<br>
</div>will work all the same.<br>
<br>
<br>
2009/2/18 Chris Watkins <<a href="mailto:chriswaterguy@appropedia.org" target="_blank">chriswaterguy@appropedia.org</a>>:<br>
<div><div></div><div>> I'm trying to run this command:<br>
><br>
> python replace.py -regex " (from wikipedia)}}" "}}" -file:sfwn1e -log:sfwlog<br>
> -summary:"adding argument to {{from wikipedia raw}} template - Step 2 of 2,<br>
> change local pagename to Wikipedia pagename"<br>
><br>
> But I get the output:<br>
><br>
> No changes were necessary in [[Oral rehydration therapy (from Wikipedia)]]<br>
><br>
> for every file, even though this text is present in every file:<br>
> (from wikipedia)}}<br>
><br>
> ...including the leading space.<br>
><br>
> Do I need to use a special character to insert the space? (And regex?) I<br>
> tried %20 instead of the space but it didn't work.<br>
><br>
> Thanks<br>
><br>
> --<br>
> Chris Watkins (a.k.a. Chriswaterguy)<br>
><br>
> Appropedia.org - Sharing knowledge to build rich, sustainable lives.<br>
><br>
> <a href="http://identi.ca/appropedia" target="_blank">identi.ca/appropedia</a> / <a href="http://twitter.com/appropedia" target="_blank">twitter.com/appropedia</a><br>
> <a href="http://blogs.appropedia.org" target="_blank">blogs.appropedia.org</a><br>
><br>
> I like this: <a href="http://five.sentenc.es" target="_blank">five.sentenc.es</a><br>
><br>
</div></div>> _______________________________________________<br>
> Pywikipedia-l mailing list<br>
> <a href="mailto:Pywikipedia-l@lists.wikimedia.org" target="_blank">Pywikipedia-l@lists.wikimedia.org</a><br>
> <a href="https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l" target="_blank">https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l</a><br>
><br>
><br>
<font color="#888888"><br>
<br>
<br>
--<br>
Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]<br>
<br>
_______________________________________________<br>
Pywikipedia-l mailing list<br>
<a href="mailto:Pywikipedia-l@lists.wikimedia.org" target="_blank">Pywikipedia-l@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l" target="_blank">https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l</a><br>
</font></blockquote></div><br><br clear="all"><br></div></div>-- <br><div><div></div><div class="Wj3C7c">Chris Watkins (a.k.a. Chriswaterguy)<br><br>Appropedia.org - Sharing knowledge to build rich, sustainable lives.<br>
<br><a href="http://identi.ca/appropedia" target="_blank">identi.ca/appropedia</a> / <a href="http://twitter.com/appropedia" target="_blank">twitter.com/appropedia</a><br>
<a href="http://blogs.appropedia.org" target="_blank">blogs.appropedia.org</a><br><br>I like this: <a href="http://five.sentenc.es" target="_blank">five.sentenc.es</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Chris Watkins (a.k.a. Chriswaterguy)<br><br>Appropedia.org - Sharing knowledge to build rich, sustainable lives.<br><br><a href="http://identi.ca/appropedia">identi.ca/appropedia</a> / <a href="http://twitter.com/appropedia">twitter.com/appropedia</a><br>
<a href="http://blogs.appropedia.org">blogs.appropedia.org</a><br><br>I like this: <a href="http://five.sentenc.es">five.sentenc.es</a><br>