False alarm!

Very sorry - I found the problem, and it was my mistake, a capitalization
error in the text I was searching for. D'oh.

Thanks for the regexinfo tho, NicDumZ.

Chris

On Wed, Feb 18, 2009 at 00:29, Chris Watkins
<[email protected]>wrote:

> Still not working :-(.
>
> I forgot to mention that I'd tried it without the "-regex" and it didn't
> work.
>
> I tried both of the commands you suggested, and again got the same result:
> "No changes were necessary in..."
>
> Going to try updating my several-month-old Pywikipedia. Turns out that last
> time I tried, I didn't do it right :-).
>
> Thanks,
> Chris
>
>
> On Tue, Feb 17, 2009 at 20:47, Nicolas Dumazet <[email protected]> wrote:
>
>> Hi!
>>
>> The space is recognized, but in regexes parenthesis have special
>> meaning, they create a group, and do not match the "()" character.
>> (the handy regex resource I use for reference :
>> http://www.amk.ca/python/howto/regex/ )
>>
>> You'll have to escape the parenthesis for python to understand that
>> you want to match the character, instead of creating a group. You may
>> have encountered the same kind of issues with brackets, only \[ will
>> match [ when using the -regex parameter.
>> """
>> python replace.py -regex " \(from wikipedia\)}}" "}}" -file:sfwn1e
>> -log:sfwlog -summary:"adding argument to {{from wikipedia raw}}
>> template - Step 2 of 2, change local pagename to Wikipedia pagename"
>> """
>> will work.
>>
>> Also, in this case, the -regex parameter is not necessary, because
>> your appear to match a single given string.
>> """
>> python replace.py " (from wikipedia)}}" "}}" -file:sfwn1e -log:sfwlog
>> -summary:"adding argument to {{from wikipedia raw}} template - Step 2
>> of 2, change local pagename to Wikipedia pagename"
>> """
>> will work all the same.
>>
>>
>> 2009/2/18 Chris Watkins <[email protected]>:
>> > I'm trying to run this command:
>> >
>> > python replace.py -regex " (from wikipedia)}}" "}}" -file:sfwn1e
>> -log:sfwlog
>> > -summary:"adding argument to {{from wikipedia raw}} template - Step 2 of
>> 2,
>> > change local pagename to Wikipedia pagename"
>> >
>> > But I get the output:
>> >
>> > No changes were necessary in [[Oral rehydration therapy (from
>> Wikipedia)]]
>> >
>> > for every file, even though this text is present in every file:
>> >  (from wikipedia)}}
>> >
>> > ...including the leading space.
>> >
>> > Do I need to use a special character to insert the space? (And regex?) I
>> > tried %20 instead of the space but it didn't work.
>> >
>> > Thanks
>> >
>> > --
>> > Chris Watkins (a.k.a. Chriswaterguy)
>> >
>> > Appropedia.org - Sharing knowledge to build rich, sustainable lives.
>> >
>> > identi.ca/appropedia / twitter.com/appropedia
>> > blogs.appropedia.org
>> >
>> > I like this: five.sentenc.es
>> >
>> > _______________________________________________
>> > Pywikipedia-l mailing list
>> > [email protected]
>> > https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>> >
>> >
>>
>>
>>
>> --
>> Nicolas Dumazet — NicDumZ [ nɪk.d̪ymz ]
>>
>> _______________________________________________
>> Pywikipedia-l mailing list
>> [email protected]
>> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>>
>
>
>
> --
> Chris Watkins (a.k.a. Chriswaterguy)
>
> Appropedia.org - Sharing knowledge to build rich, sustainable lives.
>
> identi.ca/appropedia / twitter.com/appropedia
> blogs.appropedia.org
>
> I like this: five.sentenc.es
>



-- 
Chris Watkins (a.k.a. Chriswaterguy)

Appropedia.org - Sharing knowledge to build rich, sustainable lives.

identi.ca/appropedia / twitter.com/appropedia
blogs.appropedia.org

I like this: five.sentenc.es
_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to