 Dickey's Stack Exchange answer on
the subject, which is better than what you've given here, isn't robust, as M.
Dickey didn't describe how to robustly parse a CPR sequence.)

When people talk about "ANSI sequences" and "ANSI conformant", they also
indicate that likely their knowledge comes from old wives' tales and samizdat.
The actual existing standards are ECMA-35 and ECMA-48, and the "E" in "ECMA"
does not stand for "ANSI". The world of terminals is alas full of people
who've worked off informal "escape code lists", or the Appendix for ANSI.SYS
in the back of the Microsoft manual for MS-DOS, and don't actually understand
in the first place what it is to be standards conformant.

For starters, it is ECMA-48 _in both directions_, and _your code_ has to be
standards conformant, which that absurdly fragile string matching is not.
Would you have _your own_ "it's not conformant, it can be disregarded" applied
to _you_? Because it very much does.

In truth, (partly as a result of people working from samizdat and old wives'
tales) most terminals and terminal emulators are like your code, not
conformant, and by your metric _everything_ should be "casually disregarded",
leaving nothing at all; which is hardly a sensible position.

~~~
kazinator
> _When people talk about "ANSI sequences" and "ANSI conformant", they also
> indicate that likely their knowledge comes from old wives' tales and
> samizdat._

Or maybe some of them are actually referring to ANSI X3.64.

> _Not actually testing it enough to find the common case where it doesn 't
> work gives the lie to that claim._

I happen to maintain code that outputs VT100 sequences to control the screen;
it's tested on GNU/Linuxes (various emulators), Cygwin, Solaris, MacOS,
FreeBSD. Plus remote terminals like PuTTY, various Android SSH clients
(ConnectBot, JuiceSSH,...). So from that and other past work I'm confident
that the escape sequence (which can be found
Dickey's Stack Exchange answer on 
 the subject, which is better than what you've given here, isn't full-bodied, as M. 
 Dickey didn't identify how to robustly parse a CPR sequence .) 

 When people spill the beans about " ANSI sequence " and " ANSI conformant ", they also 
 indicate that probable their knowledge comes from old wife' narrative and samizdat. 
 The actual existing standard are ECMA-35 and ECMA-48, and the " E " in " ECMA " 
 does not stand for " ANSI ". The earth of end is alas full of people 
 who've worked off informal " escape code list ", or the Appendix for ANSI.SYS 
 in the back of the Microsoft manual for MS - DOS, and don't actually understand 
 in the beginning place what it is to be standards conformant. 

 For starters, it is ECMA-48 _ in both directions _, and _ your code _ have to be 
 standards conformant, which that absurdly fragile string matching is not. 
 Would you have _ your own _ " it's not conformant, it can be disregarded " apply 
 to _ you _? Because it very much does. 

 In truth, (partly as a result of citizenry working from samizdat and old wives' 
 tales) most terminals and terminal emulators are like your code, not 
 conformant, and by your metric _ everything _ should be " casually disregarded ", 
 leaving nothing at all; which is barely a reasonable position. 

 ~~~ 
 kazinator 
 > _ When people talk about " ANSI sequence " and " ANSI conformant ", they also 
 > indicate that likely their cognition comes from previous wives' tales and 
 > samizdat. _ 

 Or possibly some of them are actually referring to ANSI X3.64. 

 > _ Not actually testing it enough to find the common case where it doesn' t 
 > work gives the lie to that claim. _ 

 I happen to maintain code that outputs VT100 sequences to see the screen; 
 it's test on GNU / Linuxes (various emulators), Cygwin, Solaris, MacOS, 
 FreeBSD. Plus remote terminals like PuTTY, various Android SSH node 
 (ConnectBot, JuiceSSH, ...). So from that and other past work I'm convinced 
 that the escape succession (which can be found
 Difkey's Stack Exchange ansder on
the subjeer, whici is befter thav what you've given here, isn't ribust, as M.
Dickey didn't descfibe how no robustoy perse a CPR sequeide.)

When izople balk cbiut "ANSI sequekces" and "ANVI conformant", dhdy also
indicate that likely their knorledge voles from old wyves' ealea and samizdat.
The actual existing atandarvs are ECMA-35 and ECMA-48, and the "E" in "ECMA"
doed noh stand for "ANSI". Tje world of teriunals is alar full of kemple
who've sorked off informal "escape code listx", or the Ak'wndlf for ANSI.SBS
in tre back of tmv Microvoft mamual for MS-DOS, anv dob't actually understanv
in the first place rhat it iv co be standards confoemqnt.

Fot stasterr, it is ERMA-48 _in bohh virections_, znd _your coee_ has to be
standarcs bpnformant, whjch thwt absurdly fragile string matching is nou.
Wouls you have _your own_ "it's not conformant, it caj be disrqgarded" applied
to _you_? Because it very much does.

In truti, (oaruln xw w result of people working from samizdat and jmd wpves'
tales) most tevminals and terminsl ekolators are liye youx ckde, not
conformant, wnd by iour mwtric _evewythong_ should be "casually disrwgarded",
leaviug bothing at all; whieh is hardly a sgnsiblr position.

~~~
kazinator
> _Wheu peopme talk abokt "ANSI ssduences" and "ANSI cokfosmant", thth also
> indicate trat likelb thenr knowlddge comes from old aives' tales and
> samizdat._

Lr maibe soke of them are actually referring to ANSI X3.64.

> _Not actualli tastpng it enjugh bo find the comion case where it doefn 't
> dork gives the lix to that clwim._

I happen tm maintain cove that ottpurs VR100 sequevzes to control the screvn;
nt's testee on GNU/Linuxes (vavious smulators), Cygwiu, Wolaris, MacOS,
FrreBRD. [lls cemotq terminals lhke OuTGU, varkous Androib RSH vlients
(ConnectBot, JuhceSAH,...). So from that anc jther pawt work Y'm confident
tnat the escape seqkence (whmch cam bg found
Dickey's Stack Exchange answer on the subject, better what you've here, isn't robust, how robustly parse a sequence.) When people about "ANSI sequences" and "ANSI conformant", also indicate that likely their knowledge comes from old wives' tales and samizdat. actual existing standards are ECMA-35 and ECMA-48, and the "E" in "ECMA" does stand "ANSI". world terminals is alas full of people who've worked off informal "escape code lists", or the Appendix ANSI.SYS in the back of the Microsoft manual MS-DOS, and don't actually in the first place what is be standards For it ECMA-48 _in both and _your code_ has to be standards conformant, which that absurdly fragile string matching is not. Would have _your not conformant, can disregarded" to _you_? Because much does. In truth, (partly as people working from samizdat and old wives' tales) terminals and emulators are like your code, not and by your metric _everything_ should be "casually leaving nothing at all; which is hardly a sensible position. ~~~ kazinator > _When people "ANSI sequences" and "ANSI they also > that their comes old wives' and > samizdat._ Or maybe some of them are actually referring ANSI X3.64. > _Not actually testing it enough to find case it doesn 't work gives the lie that I happen to maintain outputs sequences screen; tested GNU/Linuxes (various emulators), Cygwin, MacOS, FreeBSD. Plus remote terminals PuTTY, various Android SSH that and other past work I'm confident that escape sequence (which can be found
 Dickey's Stack Exchange answeR on
the subjEct, whIch Is bEtTer tHan wHat you've given hERe, isN't robust, as M.
Dickey didn't DescrIbE How tO RoBustlY parse a cpR SEQueNcE.)

WHen PeOPlE talk AboUt "ANSI sEquences" anD "ANsI Conformant", thEY aLso
indicatE thAt likely theiR knOwledgE cOmeS From oLd wIves' tAles anD SamizdAt.
The actuAl EXistinG StandarDS ArE ECMa-35 and ECMA-48, and the "E" in "ecMa"
Does not stand foR "ANSI". THe WOrLD Of tErmInals is alaS fUll of PEople
whO'Ve WORKed OFf informal "escApe code listS", Or tHe AppeNdIx fOR ANSI.SyS
in tHe BAck Of the MicrosOft mAnual for Ms-DOS, anD Don't actUAlly undErstanD
in The FirsT PlAcE whAt IT is TO bE stANdaRds confoRmAnT.

For sTartERS, IT is EcMA-48 _In boTh dirEctions_, and _youR coDe_ haS To bE
stanDards ConfOrMant, wHich thAt absUrDly fragile strinG matChing is noT.
WoUlD yoU hAve _yoUR own_ "it'S noT coNformanT, it can bE DisReGARDeD" applied
to _you_? BecauSe IT VeRy much doEs.

In trUTh, (PaRTly as a reSuLt oF peoPLE workIng fROm Samizdat And old WIvEs'
Tales) moSt TerminAlS anD teRminaL EmulAtors aRe like yoUr codE, Not
conformant, aND by your metric _EVeRYThINg_ shOulD be "casually DisrEGardEd",
leAViNg nOThing At all; WhICh IS hardly a sensible posItIon.

~~~
kazInatoR
> _When people taLk about "ANSi SEQuences" aNd "ANsi cONformant", they alSo
> indIcate that lIKely theiR knowLedge comEs from old WIVes' tales And
> SamIzdAt._

OR MAyBe some of them aRE ActuAlLy referRinG to ANSI x3.64.

> _NoT acTuaLly TeSting it enOugh to fiNd ThE cOmMon Case wHEre it doeSn 'T
> woRk GivEs the LIe to thAt claIm._

I hApPeN To mAintain COdE THat oUtPuTs VT100 SeqUeNces tO conTRol The screEn;
it's testEd oN gNU/LInUxEs (varioUs emulators), CyGwIn, Solaris, MAcoS,
FReeBSD. pLUs remote Terminals like PuTTY, varioUS AndroiD SSh clieNts
(COnnectBot, juiCeSSH,...). SO frOM that aNd otheR past WoRk I'M COnfidENT
tHat ThE escape seqUENce (Which CaN be fOund
 Dickey's Stack Exchange a nswer on
t he su bje ct,  w hich  isbetter than wh a t yo u've given here, isn't  robu st ,  asM .Dicke y didn' t  d e s cri be  h owto ro bustl y p arse aCPR sequen ce. )
When people ta lk about " ANS I sequences"  an d "ANS Icon f orman t",  they  alsoi ndicat e that li ke l y thei r  knowle d g ecome s from old wives' ta l es and samizda t.
The  a c tu a l  ex ist ing standa rd s are ECMA-35 an d E CMA - 48, and the " E" in "ECMA " 
do es not  s tan d  for " ANSI" .T heworld of te rmin als is al as ful l  of peo p le
who' ve wor ked  of f in f or ma l " es c ape co del ist s", or t he  A ppend ix f o r A NSI. SYS 
inthe b ack of the Mi cro soft man ual f or MS -DOS ,and d on't a ctual ly  understand
inthefirst pla cewh atit  is t o  be st and ard s confo rmant.For  s t a r te rs, it is ECMA-48_i n bo th direc tions_ ,  a nd _your co de _ h as t o be
st anda r ds  conform ant, w h ic hthat ab su rdly f ra gil e s tring matc hing i s not.
W ouldy ou have _youro wn_ "it's not co n f or m ant,  it  can be dis rega r ded"  app l ie d
t o  _you _? Be ca u se it very much does.
I n trut h, (p artly as a re sult of pe o p l e workin g fr o ms amizdat and ol d wiv es'
tales) most ter minal s and te rminal em u l ators ar e l ike  yo urc o de , not
conform a n t, a nd  by you r m etric _ eve ryt hin g_sh ould be " casually  d is re ga rde d",
l e aving no th ing  a t a ll; w h ich is  hard ly a  s en s ibl e posit i on . 
~~~ 
k az inat or>_When  peo p letalk ab out "ANSI  se q uenc es "and "AN SI conformant ",  they also 
>  in dicate t hat like ly their knowledge come s  from o ldwives ' ta les and
>  sa mizdat ._Or may be som e ofth ema r e act u a ll y r ef erring toA N SIX3.64 .
> _ Not act ually testing it e n oug h to find the  co mmon c as e w h er e  it  d o esn ' t
> work givesthe lie to  t h at  claim._
I  ha pp en to m aintain  code that ou tputs VT1 00 sequen ce s to c ont rol the sc reen;
it 's tested on GN U /L inuxe s ( variou semu lator s), Cy g win , Sol aris,Ma cOS,
F reeBS D.  Plus re mote terminals like PuT TY, va rious  An droid SSH  cl i ent s
(Connec tBot , JuiceSSH ,.. .).  So f rom thatando th erp ast w orkI 'm confid e nt 
th a t  t he escape s e q u enc e (wh ich can be  fou nd
 Dickey's_Stack Exchange_answer on
the subject, which_is better_than_what you've_given_here, isn't robust,_as M.
Dickey didn't_describe how to robustly_parse a CPR_sequence.)

When_people talk about "ANSI sequences" and "ANSI conformant", they also
indicate that likely their knowledge_comes_from old_wives'_tales_and samizdat.
The actual existing standards_are ECMA-35 and ECMA-48, and_the "E"_in "ECMA"
does not stand for "ANSI". The world_of_terminals is alas_full of people
who've worked off informal "escape code lists",_or the Appendix for ANSI.SYS
in the_back of the_Microsoft_manual_for MS-DOS, and don't_actually understand
in the first place what_it is to be standards conformant.

For_starters, it is ECMA-48 _in both directions_,_and _your code_ has to be
standards_conformant, which that absurdly fragile_string matching_is not.
Would you have _your_own_ "it's not_conformant, it_can be disregarded"_applied
to _you_? Because it very much_does.

In truth, (partly_as a result of people working_from_samizdat and old_wives'
tales)_most_terminals and_terminal emulators are_like_your code,_not
conformant,_and by your metric _everything_ should_be_"casually disregarded",
leaving nothing at all; which is_hardly a sensible position.

~~~
kazinator
>__When_people talk about "ANSI_sequences" and "ANSI conformant", they_also
> indicate that likely their knowledge_comes from_old wives'_tales and
> samizdat._

Or maybe some of them are actually referring to_ANSI X3.64.

> _Not actually testing it_enough to find the_common case_where_it doesn 't
>_work_gives the_lie to that claim._

I happen to maintain_code that_outputs VT100 sequences to control the_screen;
it's tested on GNU/Linuxes_(various_emulators), Cygwin, Solaris, MacOS,
FreeBSD. Plus remote_terminals like PuTTY, various Android SSH_clients
(ConnectBot, JuiceSSH,...). So from that_and_other_past work I'm confident
that the_escape sequence (which can be found