My appologies for not including the sample data. Lines begin with SC or MC and are tab delimited
SC 11-Aug-2009 07:54:38 626 "Heinrich" 107 0800375...@sip2.switchtel.co.za:5060 171665a3-9560-4003-a649-9eeb72214130 N/A N/A 10.0.1.249:6090 - 10.0.1.197:2234 1 (excellent) G729a G729a 31343 31348 20 20 0 15 170 0 0 66.8.102.5:6092 - 41.203.29.100:13682 5 (very bad) G729a G729a 31348 31343 20 20 10131 16 39904660 0 0 N/A N/A N/A N/A N/A N/A N/A SC 11-Aug-2009 07:58:45 332 PSTN2/1-?(00) "Prashil" 106 d8324eef-c206-4f8e-bf9e-673419f76233 PSTN call,PSTN call N/A 10.0.1.249:6000 - 10.0.1.174:2226 1 (excellent) G729a G729a 16360 16370 20 20 0 15 63 0 5 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A MC 11-Aug-2009 08:04:16 0 "Prashil" 106 "Hishal" 111 32171bd8-db95-4392-9aa5-8f5b40ccd01d N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A SC 11-Aug-2009 08:00:49 91 PSTN1/1-"Returned Call:" <?> "Malcolm" 112 2601d0b4-8e53-40b4-9fa8-1d16b0e49c74 PSTN call N/A 10.0.1.249:6014 - 10.0.1.178:2230 1 (excellent) G729a G729a 4546 4556 20 20 0 1 3 0 4 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A SC 11-Aug-2009 07:58:56 179 PSTN0/1-? "Lourens" 109 39c8b046-471a-4256-99c4-5cc97b0e084b PSTN call N/A 10.0.1.249:6004 - 10.0.1.177:2222 1 (excellent) G729a G729a 8925 8929 20 20 0 15 20 0 4 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A SC 11-Aug-2009 07:59:12 73 PSTN1/1-?(00) "Malcolm" 112 2601d0b4-8e53-40b4-9fa8-1d16b0e49c74 PSTN call,PSTN call N/A 10.0.1.249:6006 - 10.0.1.178:2226 1 (excellent) G729a G729a 3049 3053 20 20 0 10 6 0 4 N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A On Mon, Aug 24, 2009 at 12:19 PM, Thomas Bätzler<t.baetz...@bringe.com> wrote: > Hello Gregory, > > Gregory Machin <gregory.mac...@gmail.com> 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 following regex >> s/(\"([^"]+)\"\s)//g but it doesn't seem to work. > > It's always helpful if we can see several lines of sample input aswell as the > output you wish to achieve so that we can understand your problem better. If > your code doesn't work, please post the relevant portion of it. > > The RE you quoted will match a substring consisting of a double quote, > followed by at least one character that is not a double quote, followed by > another double quote and finally a whitespace (blank, tab) character. The > match will be removed sicne you replace it with an empty string. Due to the > modifier /g it will do that to multiple instances of the match in one line. > > > -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/