[Gambas-user] Parsing error with Replace$/Instr
R. Stormo
rohnny at ...1248...
Sun Jan 13 22:13:48 CET 2008
Richard Terry-2 wrote:
>
> 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
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
this should do the trick.
Replace$(TextBox1.Text, "\\plain\\f3\\fs24 \\par }", "</body></html>")
Regards R. Stormo
My Gambas Community http://gambasforum.tk
--
View this message in context: http://www.nabble.com/Parsing-error-with-Replace%24-Instr-tp14781076p14791164.html
Sent from the gambas-user mailing list archive at Nabble.com.
More information about the User
mailing list