In regular expressions, square brackets indicate character classes. In this case you will match on any of the following list of characters:
[ \ s ( /
I'm actually a little surprised that the regular expression engine doesn't throw an error on an unescaped open square bracket in a character class, but it seems to have no problem parsing it, so...
The rest of the expression just requires the literal string ssshd\s. Thus the following outputs 1:
print '(ssshd\s' =~ m<[[\\s(/]ssshd\\s>;
In reply to Re: Reg Exp
by kennethk
in thread Reg Exp
by GS
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |