RE: Regex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Nitsan Bin-Nun

> If you can point me on the character which control-z creates it would
make
> it easier, I have no idea of it ;)

On Thu, Mar 26, 2009 at 11:06 PM, <Jesse.Hazen@xxxxxxxxxxxxx> wrote:
>>
>> Thanks again. Sad to say, same result.
>>
>> The second option looped an error: Warning: preg_replace():
Compilation
>> failed: nothing to repeat at offset 17

The actual value is 0x1A, and it maps to the ASCII SUB (substitute)
control character. The carrot-Z (^Z) representation is how Unix CLI
software would display it. Many control codes that didn't actually do
anything were printed on the terminals with the carrot prefix. Sometimes
codes that did trigger a function in the terminal would be printed that
way to prevent the function from triggering.

Control-Z is a left over from the CP/M days. It was used to mark the end
of text files, since the original file allocation table (FAT) only
tracked the number of clusters assigned to a file. Some MS-DOS and
MS-Windows applications still tack it on to the end of files. I guess
that's their idea of backward compatibility.

Bob McConnell

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux