[Pdx-pm] Simplistic, yet complicated question....

Jeff Zucker jeff at vpservices.com
Mon Dec 9 12:59:02 CST 2002

aj wrote:

> Sorry about the confusion...
> Again here is the data:
> 123454 text                67890 Get Rid of text
> 234555 more text to keep
> The text I am wanting to remove is "67890 Get rid of text".  The only
> pattern to this data is the multiple spaces between "12344 text" and
> "67890 text".  The space pattern could be 2 or it could be 20.

And what about the lines that you want to keep?  Is it guaranteed that 
they will never contain two or more spaces next to each other?  If so 
then this should work:

   s/  .*//;

(In English: find two consecutive spaces and remove them and everything 
that follows them.)


More information about the Pdx-pm-list mailing list