3 ms·
This is very cool! If you put enter this regexp, you get a visualization of a Telnet protocol lexer. (?:[^\xFF\x0D]+|\x0D(?:\x0A|\x00)|\xFF(?:[\xFA\xFB\xFC\x
by Twisol 14y ago
This is very cool! If you put enter this regexp, you get a visualization of a Telnet protocol lexer.
(?:[^\xFF\x0D]+|\x0D(?:\x0A|\x00)|\xFF(?:[\xFA\xFB\xFC\xFD\xFE].|\xFF|.))*
The graphic makes it obvious why Telnet requires NUL to follow any bare CR's: if it didn't, you would need a byte of lookahead!