Re: Trying to remove text in inverted commas.

2009-08-25 Thread Dr.Ruud
Gregory Machin wrote: I'm writing a script to import logs into a Mysql .. My Perl is rusty and I'm battling with a convention on the one column. I need to remove the text in inverted commas "Prashil" 106 so that just the number 106 remains.. I have been trying the following regex s/(\"([^"]+)\

Re: Trying to remove text in inverted commas.

2009-08-24 Thread Ahmed Shabana
On Mon, Aug 24, 2009 at 12:19 PM, Gregory Machin wrote: > Hi > > I'm writing a script to import logs into a Mysql .. My Perl is rusty > and I'm battling with a convention on the one column.  I need to > remove the text in inverted commas  "Prashil" 106 so that just the > number 106 remains.. I have

Re: Trying to remove text in inverted commas.

2009-08-24 Thread Tim Bowden
*WARNING* Newbie alert! ;-) There's probably much better regexs than what I've done here, and I put them together before you posted this data (and maybe they don't always do what I've said; Enough qualification? :-O ) but here's my go at it #!/usr/bin/perl -wT use strict; my @log_entries = ('"s

Re: Trying to remove text in inverted commas.

2009-08-24 Thread Gregory Machin
My appologies for not including the sample data. Lines begin with SC or MC and are tab delimited SC 11-Aug-2009 07:54:38626 "Heinrich" 107 0800375...@sip2.switchtel.co.za:5060 171665a3-9560-4003-a649-9eeb72214130N/A N/A 10.0.1.249:6090 - 10.0.1.197:2234 1 (

AW: Trying to remove text in inverted commas.

2009-08-24 Thread Thomas Bätzler
Hello Gregory, Gregory Machin asked: > I'm writing a script to import logs into a Mysql .. My Perl is rusty > and I'm battling with a convention on the one column. I need to > remove the text in inverted commas "Prashil" 106 so that just the > number 106 remains.. I have been trying the followi

Trying to remove text in inverted commas.

2009-08-24 Thread Gregory Machin
Hi I'm writing a script to import logs into a Mysql .. My Perl is rusty and I'm battling with a convention on the one column. I need to remove the text in inverted commas "Prashil" 106 so that just the number 106 remains.. I have been trying the following regex s/(\"([^"]+)\"\s)//g but it doesn'