Re: [PHP] Write multiple backslashes

[email protected] (Danny)
Newsgroups php.general
Message-ID <[email protected]>
As a matter of interest I got it solved using 8 backslashes ... one would think
that 1 backlash will escape 1 more backlash, but it doesn't. Somehow 8
backlashes did the job ... don't ask me how ...

$IGNORE_TMP=^(\\\\\\\\*.*\\\\\\\\*)$

Thank you for everyone's input ...

> 
>     I'm no regard expert but don't you have to escape it for each one?
>     Something like $second_rexexp = "ignore_tmp=^(\\\\*.*\\\\*)$";
> 
>     I could be way off base though...
> 
> 
> Yes that's true but only because it is a double quoted string, meaning
> backslashes are treated as escape sequences. 
> 
> You could also just use a single quoted string.
> 
> $second_regexp = 'IGNORE_TMP=^(\\*.*\\*)$';
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.