bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] How to unescape a string?


From: Lorenz
Subject: Re: [bug-gawk] How to unescape a string?
Date: Wed, 24 Oct 2018 05:54:01 +0000

david kerns wrote:

>I was hoping this would, but it doesn't .. perhaps it will spur someone
>else :/
>
>awk 'BEGIN { a ="a\\\\b\\\""; print a; gensub(/\\(.)/, "\1", "g", a); print
>a }'
>a\\b\"
>a\\b\"

in contrast to sub and gsub, gensub does not manipulate the source but
returns the modified string.
-- 

Lorenz




reply via email to

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