in reply to new line every match
Were you wanting something like the following for your data set?
use Modern::Perl; while (<DATA>) { if ( !/\d/ ) { print; } else { say $1 while /(address.{13})/g; } } __DATA__ This is the list of address here are the addreses address 6433 main st address 6434 main st address 6435 main st
Output:
This is the list of address here are the addreses address 6433 main st address 6434 main st address 6435 main st
|
|---|