bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] feature request: expanding escape sequences


From: Ed Morton
Subject: Re: [bug-gawk] feature request: expanding escape sequences
Date: Sun, 06 Jul 2014 13:25:31 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0


On 7/6/2014 1:05 PM, Manuel Collado wrote:
El 06/07/2014 16:26, Ed Morton escribió:
Arnold - I don't believe it can be done fairly easily in any way. For
example, wrt your suggestion of splitting on an RE, let's say I define my
escape-sequence matching RE as '\[[:alpha:]]`. Well, that's wrong:

Please try this RE:

  /\\(x[0-9a-fA-F]*|[0-7]{1,3}|.)/

It should match every valid escape sequence. And every unnecessarily escaped normal character.

Hope this helps. Regards.

That does identify the escape sequences in my small set of test cases, so assuming it works for every case (and it looks like it should) then all that'd be left to do is mapping them to their equivalent literal characters. Any suggestions on a concise way of doing that?

Thanks,

     Ed.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]