develooper Front page | perl.beginners | Postings from August 2009

Trying to remove text in inverted commas.

Thread Next
From:
Gregory Machin
Date:
August 24, 2009 02:19
Subject:
Trying to remove text in inverted commas.
Message ID:
30200a940908240219g6b027591pd4d722484e7f311e@mail.gmail.com
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't seem to work. I got it from a
website .. It looked correct .. mmm .. with regard to it's structure i
don't quite get ([^"]+) as I have tried replacing it with other
combinations and had less luck. I have also tried
s/\"([:word:])\"\s)//g ...

Thanks for advise in advance

Gregory Machin

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About