[Gretl-users] Quotation marks (" ") and string manipulation

Henrique Andrade henrique.coelho at gmail.com
Mon May 18 15:43:13 EDT 2015

Em 18 de maio de 2015, Sven escreveu:

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? (...)
> 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.

Dear Sven, thanks for your attention!

I tested with the resub and I got no success. Take a look at the following

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 Texto1

string Texto2 = regsub(Texto, "'", "\"")
print Texto2

We can generate Texto1, but Texto2 fails.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wfu.edu/pipermail/gretl-users/attachments/20150518/01d903e4/attachment-0001.html>

More information about the Gretl-users mailing list