Re: [ubuntu-uk] [OT] Quick Perl question...

2010-07-12 Thread Matthew Bassett
I'm pretty sure you need to avoid matching the start of the 2nd tag, otherwise text of the form: abcdefghij Will be extracted as: abcdefghij E.g. Use a character class that avoids matching the start of a tag: $solar_info =~ s!([^<]*)!$1!g; -- Matthew Bassett Sorry about the top posting- am

Re: [ubuntu-uk] [OT] Quick Perl question...

2010-07-12 Thread Matthew Bassett
Rather than removing the , pair as separate actions it might be easier to use them to 'anchor' the start and end of text you want to extract. Try: $solar_info =~ s/([^<]*)<\/solar>/$1\n/; This matches everything between the ... pair, and replaces it with the text in between- it also sticks

Re: [ubuntu-uk] [OT] Quick Perl question...

2010-07-12 Thread Matt Wheeler
On 12 July 2010 22:55, LeeGroups wrote: > This input 8,27.31,28.68,28.81,0.00,0.00,0 > It need to be -- > 8,27.31,28.68,28.81,0.00,0.00,0 > > Another line chops off the . > The problem is that occasionally there is rubbish on the end of the > line, or even another line appended to the end of the f

Re: [ubuntu-uk] [OT] Quick Perl question...

2010-07-12 Thread Jon Spriggs
So, why not do /(.*)<\/solar>/ ? -- Jon "TheNiceGuy" Spriggs On 12 Jul 2010 22:56, "LeeGroups" wrote: >> $solar_info =~ s/<\/solar>.*/,/; >> >> From my tinkerings, this should find the string ... > What's the input string? The following code simply prints "," for me > not ",abcdef" as you

Re: [ubuntu-uk] [OT] Quick Perl question...

2010-07-12 Thread LeeGroups
>> $solar_info =~ s/<\/solar>.*/,/; >> >> From my tinkerings, this should find the string in the string >> $solar_info, and then remove it and any number of following characters >> (the .*) and then replace them with a ",". >> Except that it doesn't. It hacks out the and replaces it with a >> ,

Re: [ubuntu-uk] Quick Perl question...

2010-07-12 Thread Jon Spriggs
I'm not very^h any good with Regex, but try putting ()'s around what you want to search for. Also, try out rubular.com to experiment without needing to drop out of your editor and running something to test it. All the best, -- Jon "TheNiceGuy" Spriggs On 12 Jul 2010 21:13, "LeeGroups" wrote:

Re: [ubuntu-uk] Quick Perl question...

2010-07-12 Thread Colin Law
On 12 July 2010 21:12, LeeGroups wrote: > I'm having a bit of an issue with a Perl script on my Ubuntu server at > home (can you see what I did there :)... > > The line in question is this... > > $solar_info =~ s/<\/solar>.*/,/; > >  From my tinkerings, this should find the string in the string >

Re: [ubuntu-uk] [OT] Quick Perl question...

2010-07-12 Thread Thomas Ibbotson
On 12 July 2010 21:12, LeeGroups wrote: > $solar_info =~ s/<\/solar>.*/,/; > >  From my tinkerings, this should find the string in the string > $solar_info, and then remove it and any number of following characters > (the .*) and then replace them with a ",". > Except that it doesn't. It hacks ou

[ubuntu-uk] Quick Perl question...

2010-07-12 Thread LeeGroups
I'm having a bit of an issue with a Perl script on my Ubuntu server at home (can you see what I did there :)... The line in question is this... $solar_info =~ s/<\/solar>.*/,/; From my tinkerings, this should find the string in the string $solar_info, and then remove it and any number of

Re: [ubuntu-uk] Blogkt not running 0n 10.04?

2010-07-12 Thread Liam Proven
On 12 July 2010 13:31, Gordon wrote: > > So any recommendations for a good blogging app in 10.04? Depends what you want & what service(s) you use. I use Logjam and Drivel, the former for my personal Livejournal and the latter for my techie one, liam-on-linux.livejournal.com. Both work well for me

Re: [ubuntu-uk] Blogkt not running 0n 10.04?

2010-07-12 Thread Gordon
On Tue, 06 Jul 2010 15:26:43 +0100, Simon Greenwood wrote: > On 6 July 2010 15:22, Gordon > wrote: > >> I installed Blogkt on my 10.04 Netbook remix, no errors reported, but >> when I click on the icon, nothing happens. Any one had this, and is >> there a way to fix it? >> >> > There's a bug in

Re: [ubuntu-uk] ubuntu-uk Digest, Vol 63, Issue 23

2010-07-12 Thread Andrew Woodhead
RE: boot livecd to ram etc: https://bugs.launchpad.net/baltix/+source/casper/+bug/25496 http://brainstorm.ubuntu.com/idea/2630/ https://wiki.ubuntu.com/BootToRAM I believe it's a feature in the n