in reply to Re: Regex doubt
in thread Regex doubt

That will leave $line unchanged, as it will change a string consisting of TelecommuterTrac followed by a backslash, followed by WebIntHitList3 to country. But $line was assigned "TelecommuterTrac\WebIntHitList3" which does not contain a backslash. It's in double quoted context, and the backslash is escaping the W from its special meaning (which it doesn't have). So, $line equals TelecommuterTracWebIntHitList3.

Replies are listed 'Best First'.
Re^3: Regex doubt
by anonymized user 468275 (Curate) on Jul 29, 2005 at 08:44 UTC
    That depends - the OP may have originally been presented with a problem in which the backslash was there but is losing the backslash during the testing process to try to fix the (wrong) problem.

    One world, one people