in reply to passwords with special characters are trying to kill me... no seriously!
The problem is your incorrect use of \b in your regex. If you want to ensure a full match use string boundaries not word boundaries:
$s = 'fred';; print 'fred' =~ m[\b\Q$s\E\b] ? 'matched' : 'no match';; matched $s = '$fred';; print '$fred' =~ m[\b\Q$s\E\b] ? 'matched' : 'no match';; no match $s = '$fred';; print '$fred' =~ m[^\Q$s\E$] ? 'matched' : 'no match';; matched
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: passwords with special characters are trying to kill me... no seriously!
by calmthestorm (Acolyte) on Feb 04, 2011 at 01:10 UTC | |
by BrowserUk (Patriarch) on Feb 04, 2011 at 01:25 UTC | |
by calmthestorm (Acolyte) on Feb 04, 2011 at 01:43 UTC | |
by calmthestorm (Acolyte) on Feb 04, 2011 at 01:39 UTC | |
by BrowserUk (Patriarch) on Feb 04, 2011 at 01:43 UTC | |
by johna (Monk) on Feb 04, 2011 at 03:46 UTC |