[Gambas-user] Parsing error with Replace$/Instr

richard terry rterry at ...1822...
Sun Jan 13 21:59:13 CET 2008


On Sun, 13 Jan 2008 03:59:21 pm Rob wrote:
> On Saturday 12 January 2008 20:08, richard terry wrote:
> > Here is some for demo purposes of my code, which bombs with the
> > error message: "Bad character constant in string".
> >
> > sResult = Replace$(alltext, "\plain\f3\fs24 \par }",
> > "</body></html>")
>
> You need to change all your "\"'s into "\\"'s.  Gambas interpolates
> character constants, such as "\n" for newline, in strings.

That seems like catch22 to me, ie want Gambas to repace the string

Doo you mean I have to do it first as replace all "\" with "\\" and then 
replace the resultant string with what I want, 

or are you saying it is impossible to do in code?

Regards

Richard




More information about the User mailing list