GOT IT!
s/^\e//;
Thanks for all your replies.
Craig
>>> "Craig Sharp" <[EMAIL PROTECTED]> 07/30/02 02:04PM >>>
Hi all,
I have several lines that start as follows:
^[(s3B
I need to remove the ^[ from each line.
Beware that there are lines in the file that do not begin as shown.
Thanks,
Cr
Eh?
my $IN = open("my.in.file") or die "Horrible death";
while (<$IN>) {
s/\A\^\[//;
# Do stuff
}
-Original Message-
From: Craig Sharp [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 30, 2002 1:04 PM
To: [EMAIL PROTECTED]
Subject: [Perl-unix-users] URGENT Regex problem
Assuming that's a caret followed by a left square bracket (as opposed to an
Escape character), you can use:
s/^\^\[//;
--
Mark Thomas[EMAIL PROTECTED]
Sr. Internet Architect User Technology Associates, Inc.
$_=q;KvtuyboopuifeyQQfeemyibdlfee;; y.e.s. ;y+B-x+A-w+s; ;
Hi all,
I have several lines that start as follows:
^[(s3B
I need to remove the ^[ from each line.
Beware that there are lines in the file that do not begin as shown.
Thanks,
Craig A. Sharp
Unix Systems Administrator
DNS Administrator
Roush Industries
Office: 734-466-6286
Cell: 734-231-6769