Remove Lines where first character is space

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

jorgejulio
Posts: 2
Joined: Tue Jan 10, 2006 6:28 am

Remove Lines where first character is space

Postby jorgejulio » Tue Jan 10, 2006 6:40 am

Hello,
I'm trying to use Perl for the first time. I have a 9400 line text file in which I need to remove lines that start with a space, i.e. a space in the first character position of the line.
Could someone send on the perl syntax to do this one?

Thanks much,
j2

User avatar
DataMystic Support
Site Admin
Posts: 2164
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Postby DataMystic Support » Wed Jan 11, 2006 10:15 am

Use a Remove\Matching lines filter, with a perl pattern of

Code: Select all

^


(That's a space after the ^)

Or use

Code: Select all

^[ ]
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 10 guests