Re: Highlighting CLI output: what are these terms called?
Le Mer 17 avril 2013 10:22, Dotan Cohen a écrit :
> The following page has a nice example of how to highlight text in
> Here is the example:
> tail -f file.log | perl -pe 's/keyword/\e[1;31;43m$&\e[0m/g'
> What are the regex replacements in the second part of the replace
> called? They are rather hard to goolge for without a name! If anybody has a
> good resource bookmarked with examples, I would love to see that as well.
> Thank you!
Those are escape sequences from VT100 IIRC.
And, if I am not wrong, they are quite the same as those used in ecma-48,
which have free (as in free beer) specifications downloadable here:
Have fun :)
Note: this spec is quite easy to read, unlike many other I have read.