MEL How-To #11
How do I strip the "new-line-character" off of the end of my string variable?
When reading a DOS file where each line ends with a CR+LF pair, the ‘
You can use the ‘
The escape sequence that matches a LF is "
$string = match( "^[^(\r\n)]*", $string );
What this does is matches all characters starting at the beginning of a string which is not a CR or LF character, reassigning the results to
|Copyright ©2005 by Bryan Ewert, firstname.lastname@example.org|
Maya is a Registered Trademark of Alias