in reply to Regex to get file name from the path with spaces
Maybe you want to instead capture everything up to the second double quote?
.*TEXT:\s+"([^"]+)"
If you have both, lines with and lines without double quotes, you will have to show more data.
Update: After reading haukex answer, I now realize that I only understood half of your question. Use my answer to extract the full path and then use File::Spec to get the actual filename.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Regex to get file name from the path with spaces
by szpt9m (Novice) on Sep 08, 2021 at 08:09 UTC |
In Section
Seekers of Perl Wisdom