jrosenfeld has asked for the wisdom of the Perl Monks concerning the following question:
ghjghjgkhgkghj
-----
-----
fsgdfgsdfgdfsgdsfg
I would like the regular expression to match the two lines of "----" and convert them to one.
So that the result would be:
ghjghjgkhgkghj
-----
fsgdfgsdfgdfsgdsfg
I would also like it to convert multiple lines of ----- to 1 line.
I have tried :
s/-----\n-----/------/g
and many variations, but nothing has been successful. Thank You, Jeff
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Two line match
by moritz (Cardinal) on Mar 10, 2008 at 15:14 UTC | |
by jrosenfeld (Initiate) on Mar 10, 2008 at 15:21 UTC | |
by moritz (Cardinal) on Mar 10, 2008 at 15:25 UTC | |
by jrosenfeld (Initiate) on Mar 10, 2008 at 15:38 UTC | |
by moritz (Cardinal) on Mar 10, 2008 at 15:43 UTC | |
by grizzley (Chaplain) on Mar 10, 2008 at 16:12 UTC | |
by jrosenfeld (Initiate) on Mar 10, 2008 at 16:47 UTC | |
by grizzley (Chaplain) on Mar 10, 2008 at 18:17 UTC | |
|
Re: Two line match
by toolic (Bishop) on Mar 10, 2008 at 15:25 UTC | |
by jrosenfeld (Initiate) on Mar 10, 2008 at 15:46 UTC | |
by toolic (Bishop) on Mar 10, 2008 at 16:10 UTC | |
|
Re: Two line match
by NetWallah (Canon) on Mar 10, 2008 at 16:07 UTC | |
by jrosenfeld (Initiate) on Mar 10, 2008 at 20:45 UTC | |
|
Re: Two line match
by olus (Curate) on Mar 10, 2008 at 15:15 UTC |