in reply to Re^3: Problems with a regex?
in thread Problems with a regex?
I would think so too, reading the docs. But with /^\Q$stack\E$/, I get:
Service name: "MY NEW SERVICE (TMP)" Popping stack: . Adding to stack: "MY NEW SERVICE (TMP)" Service name: "MY NEW SERVICE (TMP)" It's on stack, keep compiling
And with /^\Q$stack$/, I get:
Service name: "MY NEW SERVICE (TMP)" Popping stack: . Adding to stack: "MY NEW SERVICE (TMP)" Service name: "MY NEW SERVICE (TMP)" Popping stack: "MY NEW SERVICE (TMP)". Adding to stack: "MY NEW SERVIC +E (TMP)"
More simply:
$ perl -e "$x=$_='()';print/^\Q$x\E$/?YES:NO" YES $ perl -e "$x=$_='()';print/^\Q$x$/?YES:NO" NO
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Problems with a regex?
by BrowserUk (Patriarch) on Aug 14, 2012 at 18:06 UTC |