in reply to Re: perl regex to match newline followed by number and text
in thread perl regex to match newline followed by number and text
I guess something very, very simple like this is possible? 3 input lines to one output line?Good idea, but why then still use a regex?
Outputwhile (<DATA>) { chomp; print; print $. % 3 ? " " : "\n"; } __DATA__ 99~Arun~Kumar~Mobilenum: 1234-567 , from Earth Human 98~Mahesh~Babu~Mobilenum: 5678-901 , from Earth Human
99~Arun~Kumar~Mobilenum: 1234-567 , from Earth Human 98~Mahesh~Babu~Mobilenum: 5678-901 , from Earth Human
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: perl regex to match newline followed by number and text
by arunkumarzz (Novice) on Jun 01, 2019 at 18:07 UTC | |
by holli (Abbot) on Jun 01, 2019 at 18:29 UTC |