in reply to File regex question
If you're passing this data to another application that will choke on the spaces, you may want to check and see if quoting the directory/file names will work. Then you could do something like....
perl -i.bak -lne '@F=split(/ /,$_,3);print "$F[0] $F[1] \"$F[2]\""' filename
Of course, that doesn't take into account any lines not matching the expected format (e.g., blank lines are no longer blank)
|
|---|