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.