How can I make this Perl regex work?
- by Geo
I have this line ( it's a single line, SO makes it seem like 2 ):
/Od /D "WIN32" /D "_DEBUG" /FD /EHa /MDd /Fo"Debug" /Fd"Debug\vc80.pdb" /W3 /c /Zi /clr /TP .\main.cpp"
And I want to extract the .\main.cpp. I thought the following would do the trick:
if($string =~ /.*\s+(.*)$/i) {
print "matched ",$1,"\n";
}
because this same regex works in Ruby, and extracts the string I required. How can I get it working?