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/(\"([^"]+)\
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
*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
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
(
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
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'