Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Obtain CSV Fiile from text

by Don Coyote (Hermit)
on Mar 06, 2014 at 14:02 UTC ( [id://1077233]=note: print w/replies, xml ) Need Help??


in reply to Obtain CSV Fiile from text

This matching pattern with the use of lookarounds delimited by spaces extracts the filename you require. When you say delimiters I am hoping you are referring not to the spaces between each character blocks.

#!/usr/bin/perl use warnings; use strict; my $line = q{3,"2014-02-19 14:29:05","Extracted 1 Unfulfilled Reconcil +iation records into /opt/mysql/backup/recon/201312/input/UNFULFILLED_ +RECONCILIATION_20130225.CSV","URECONCILIATION"}; $line =~ m{ \s\S*?(?!\.CSV) # space delimited text filter \s(\S*?(?<=\.CSV)) # filename }x; print $1;
Edit: ah, one liner as in need to pipe it or so. oops sorry thought you were after the pattern.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1077233]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-19 04:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found