Thanks for all the responses....
I tried all of that earlier. However I could not get it to match on the
CRLF at the end. It is a multiline string. So I even tried the 's' switch.
The s/\s+$//
does not match. Perhaps \cJ is not white space? Remember I had \cM\cJ at
the end.
I tried s/[\r\n]+$//
and then with the 's' switch like:
s/[\r\n]+$//s
still no good.
Other than the suggested
chop chop (sounds good though)
I dont have a solution.
This is perl 5.8 running on SuSE 8 on s390 Linux.
__________________________________________
Ranga Nathan / CSG
Systems Programmer - Specialist; Technical Services;
BAX Global Inc. Irvine-California
Tel: 714-442-7591 Fax: 714-442-2840
Uri Guttman <[EMAIL PROTECTED]>
06/22/2004 08:48 PM
To: [EMAIL PROTECTED]
cc: Ranga Nathan <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
Subject: Re: [Boston.pm] regex - how to match the last
CR+LF
>>>>> "BRN" == Bill Ricker N1VUX <[EMAIL PROTECTED]> writes:
BRN> Or, my favorite,
BRN> chop while /\s$/; ### Omit all trailing
whitespace,
BRN> ###
including whole blank lines at the end
BRN> ### and
last CRLF or NL or whatever is holy
why not just s/\s+$// ?
uri
--
Uri Guttman ------ [EMAIL PROTECTED] --------
http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and
Coding-
Search or Offer Perl Jobs ----------------------------
http://jobs.perl.org
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm