Wikipedia:Reference desk/Archives/Computing/2016 July 27

= July 27 =

Some C# help needed
Hi guys! Could somebody help out with C#? If I have regex pattern  and string " ", how to change to lowercase only the second match (in this case - the "Foo", that comes after ref)? If I would need to lowercase everything, I would use something like (tested with other string, so this one may contain some small bugs, but you got the idea): Note, that this is for AWB module, so it might not look very C#-ish. -- Edgars2007  (talk/contribs) 09:16, 27 July 2016 (UTC)
 * Maybe could take a look - you have also worked with AWB modules. -- Edgars2007  (talk/contribs) 11:28, 28 July 2016 (UTC)


 * Try this: Not tested, but I've used this construct before.
 * —Trappist the monk (talk) 11:55, 28 July 2016 (UTC)
 * it kind of works. String after this becomes "Fofoo". Yes, that is what I was expecting to see after running this code, but not what I wanted to get (" Foo foo bar "). -- Edgars2007  (talk/contribs) 12:44, 28 July 2016 (UTC)
 * Perhaps this then: Again, not tested.   replaces all of   with whatever you return from the , right?  If you want to keep bits of   then you need to capture them, modify the captures to suit, reassemble, and return the result.    is the raw match;   is the first capture, etc.
 * —Trappist the monk (talk) 13:24, 28 July 2016 (UTC)
 * I thought, that there will be easier solution, but this one works, so thank you! -- Edgars2007  (talk/contribs) 17:35, 28 July 2016 (UTC)

xwp file
How do I install a .xwp file? Can someone help me please? I collected some clock gadgets a while back from this website. After downloading and opening the WinRar folder, I found a .xwp file - if I re-extract this .xwp file, I find a Widget folder which consisting all the bits. Problem is I still don't know how to install... -- Apostle (talk) 18:12, 27 July 2016 (UTC)
 * Your link goes to Google Images and doesn't open any particular image for me. You need to link to the actual web site, not Google Images.
 * After 60 seconds of research (googling "xwp gadget") I found XWidget which seems to use .xwp files, so maybe that's what you need. I know nothing about it, though. -- BenRG (talk) 23:27, 28 July 2016 (UTC)