- Descripción del problema y solución en Perl
- Vídeo del profesor Solución en JS
- Repo en GitHub
- Como usar xregexp en JavaScript GitHub repo en ULL-ESIT-GRADOII-PL
ANSI sequences were introduced in the 1970s to replace vendor-specific sequences and became widespread in the computer equipment market by the early 1980s.
They were used by the nascent bulletin board systems to offer improved displays compared to earlier systems lacking cursor movement, a primary reason they became a standard adopted by all manufacturers.
See the video Connect: A Look At Bulletin Board Systems
Certain sequences of bytes, most starting with Esc
and [
, are embedded into the text,
which the terminal looks for and interprets as commands, not as character codes.
\033
begins the escape sequence[
indicates the color33
is the foreground color for yellowm
indicates the end of the setting
Note: \033[39m
is used set the color back to the terminal default
console.log('\033[33m Hello World \033[39m');
This will give a nice yellow color Hello World.
The complete table of ANSI Escape Codes is available at http://en.wikipedia.org/wiki/ANSI_escape_code