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

Trying to remove text in inverted commas.

Thread Next
Gregory Machin
August 24, 2009 02:19
Trying to remove text in inverted commas.
Message ID:

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 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About