HélioAs an example of Perl regex, the following Unix command gives the expected result.But only works for the "\\", of you try with other escaped chars it fail.Hi Henrique,I think you found a bug. The following code works fine:
string Texto2 = regsub(Texto, "[']", "\\")
print Texto2
sed "s/[']/\"/g" "Morte e Vida SeverinaSeverino.txt"On Mon, May 18, 2015 at 8:43 PM, Henrique Andrade <henrique.coelho@gmail.com> wrote:_______________________________________________Em 18 de maio de 2015, Sven escreveu:I'm not 100% sure what your question is, but the help for strsub() says to use the regsub() function for more complex stuff, so that would probably be my advice.Am 18.05.2015 um 21:17 schrieb Henrique Andrade:
Dear Gretl Community,
How can I use quotation marks inside a Gretl function that deals with
strings? (...)
Dear Sven, thanks for your attention!I tested with the resub and I got no success. Take a look at the following code:string Texto = sprintf("\n\O meu nome é 'Severino',\n\como não tenho outro de pia.\n\Como há muitos 'Severinos',\n\que é santo de romaria,\n\deram então de me chamar\n\'Severino de Maria'.")string Texto1 = strsub(Texto, "'", "*")print Texto1string Texto2 = regsub(Texto, "'", "\"")print Texto2We can generate Texto1, but Texto2 fails.Best,Henrique
Gretl-users mailing list
Gretl-users@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users