[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Backslash in strings
- From: Groleo Marius <groleo@...>
- Date: Fri, 18 Mar 2005 14:36:19 +0200
I tried and it worked, the problem is :
What happens when I have to pass a regex to the c++ funtion?
\W as regexp would become \\W
\\W as regexp would become \\\\W
Which is confusing, and hard to track for a script
On Fri, 18 Mar 2005 13:32:43 +0100, Erik Hougaard <erik@hougaard.com> wrote:
> Use \\ as \
>
> /Erik
>
> Groleo Marius wrote:
>
> >Hi
> >
> >I'm passing a string from LUA to a c++ function.
> > The problem is that when I'm trying to pass something like:
> > "\Wabc\new\trial"
> > \W from \Wabc is regarded as an escaped character.
> > the same thing for \n from \new and \t from trial.
> > How can I pass the string to the c++ function, so the \W wont be
> > treated as an escape
> > character.
> >
> >
>
>
--
Regards, Groleo!
.''`. # touch universe
: :' : # chmod +rwx universe
`. `'` # ./universe
`- Debian - when you have better things to do than fix a system