perladdict has asked for the wisdom of the Perl Monks concerning the following question:
From the above code i am getting result as usmat-d0209.mail.aol.com phani rajCentOS release 4.7 (Final) usmat-d0210.mail.aol.com phani rajCentOS release 4.7 (Final) usmat-d0211.mail.aol.com phani rajCentOS release 4.7 (Final) usmat-d0212.mail.aol.com phani rajCentOS release 4.7 (Final) usmat-d0213.mail.aol.com phani rajCentOS release 4.7 (Final) It is not matching second line properly[root@phaniraj ~]# cat p1 | perl -p -e 's/^(usmat.*)\n(.*)/$1 phani $2 + raj/m '
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: The regular expression in perl one liner not giving the expected output
by jwkrahn (Abbot) on Feb 03, 2010 at 07:34 UTC | |
|
Re: The regular expression in perl one liner not giving the expected output
by CountZero (Bishop) on Feb 03, 2010 at 07:01 UTC | |
|
Re: The regular expression in perl one liner not giving the expected output
by JavaFan (Canon) on Feb 03, 2010 at 09:06 UTC |