in reply to Re: processing file content as string vs array
in thread processing file content as string vs array
Thanks for your input, pls find the sample data
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxx xxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxx xxxxxxxxxxx xxxx*@user_info_start xxxx*@Title : Mr xxxx*@Username : xxxxx xxxx*@Filetype : txt xxxx*@Version : 0001 xxxx*@Create_Date : 20190407 xxxx*@Product : xxxx xxxx*@user_info_end xxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxx
Here is the regex I used to capture the user details
if( $file_content =~ m/(.*?\@user_info_start.*?\n)(.*)(.*?\@user_info_ +end.*$)/si){ my $user_info= $2; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: processing file content as string vs array
by haukex (Archbishop) on May 13, 2019 at 07:59 UTC | |
|
Re^3: processing file content as string vs array
by jwkrahn (Abbot) on May 13, 2019 at 08:12 UTC | |
|
Re^3: processing file content as string vs array
by AnomalousMonk (Archbishop) on May 13, 2019 at 20:15 UTC |